[BUGA] C++ Question
Benjamin Close
cisbjc at cs.unisa.edu.au
Mon Jul 10 16:12:20 CST 2006
Hi All,
On FreeBSD 6.1, & 5.4 (gcc 3.4.4) the following crashes. On Linux
(gcc 3.3.5 & gcc 4.0.0) & FreeBSD 4.11 (gcc 2.95.2 )it works.
Can anyone see what I'm doing wrong or is this a compiler/os bug.
--------------------
#include <string>
#include <map>
using namespace std;
struct Table
{
string name;
unsigned schema;
map<unsigned,unsigned> tuple;
};
Table t[] =
{
{ "test", 0x0, }
};
int main(void)
{
t[0].tuple[1]=1;
return 0;
}
-------------------
It SIGSEGV's on the t[0].tuple[1]=1 line.
Thanks,
Benjamin
--
3D Research Associate / System Administrator +61 8 8302 3669
School of Computer and Information Science Room D1-07, ML Campus
University of South Australia Mawson Lakes Blvd.
Benjamin.Close at cs.unisa.edu.au South Australia, 5095
F00D C83D 5F7E 5561 DF91 B74D E602 CAA3 4842 B5B4
More information about the BUGA
mailing list