V3 static data in classes vs AIX
David Edelsohn
dje@watson.ibm.com
Mon Jun 4 10:14:00 GMT 2001
Investigating this further, GCC only produces the common symbol if
the static class member actually is defined, not just referenced. In
other words,
class foo {
public:
static int i;
};
void p()
{
foo::i = 99;
}
does not produce a common symbol, only the reference.
The existence of a common symbol for the testcases means that
there is some definition in the header files or the compiler is generating
a definition for some input where it should not. This clearly is a bug.
I am going to try to see exactly what input is required to produce the
common symbol.
David
More information about the Libstdc++
mailing list