This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/7094: initialized static const value in class disappears sometimes
- From: pme at gcc dot gnu dot org
- To: dmonksfd at broadcom dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Date: 22 Jun 2002 00:53:08 -0000
- Subject: Re: c++/7094: initialized static const value in class disappears sometimes
- Reply-to: pme at gcc dot gnu dot org, dmonksfd at broadcom dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: initialized static const value in class disappears sometimes
State-Changed-From-To: open->closed
State-Changed-By: pme
State-Changed-When: Fri Jun 21 17:53:08 2002
State-Changed-Why:
Thank you for your bug report.
This is not a bug in GCC; your code is illegal. You have
only provided a declaration of a static member, you must
still provide a definition. (That's why the linker says
the variable is undefined -- you haven't defined it.)
You need to add
int C::VALUE;
somewhere.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7094