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: David Edelsohn <dje at watson dot ibm dot com>
- Subject: Re: V3 static data in classes vs AIX
- From: Gabriel Dos Reis <gdr at codesourcery dot com>
- Date: 04 Jun 2001 19:49:20 +0200
- Cc: Benjamin Kosnik <bkoz at redhat dot com>, libstdc++ at gcc dot gnu dot org, Mark Mitchell <mark at codesourcery dot com>
- Organization: CodeSourcery, LLC
- References: <200106041714.NAA23362@makai.watson.ibm.com>
David Edelsohn <dje@watson.ibm.com> writes:
| 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.
Excuse my naivety, but is there any reason it -should- produce the
common symbol?
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com