This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: V3 static data in classes vs AIX
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Subject: Re: V3 static data in classes vs AIX
- From: David Edelsohn <dje at watson dot ibm dot com>
- Date: Mon, 04 Jun 2001 13:14:11 -0400
- cc: libstdc++ at gcc dot gnu dot org, Mark Mitchell <mark at codesourcery dot com>
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