This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/3738
- To: Luca dot Formaggia at epfl dot ch
- Subject: Re: libstdc++/3738
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 24 Aug 2001 07:42:06 -0300
- Cc: luca dot formaggia at epfl dot ch, gcc-gnats at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <3B8626C7.24F165D2@epfl.ch>
On Aug 24, 2001, Luca Formaggia <Luca.Formaggia@epfl.ch> wrote:
> Well, for static integral constant member it should work, accordind to
> B.Stroustrup, 3rd Ed., pag 249, unless the standard has changed since then.
The ISO C++ Standard says all static data members referenced in a
program must be defined (outside the class body, as opposed to only
declared inside it), but they must omit the initializer if the
declaration already initializes it. Note, however, that no diagnostic
is required in case this rule is violated, which means the compiler is
allowed, but not required to, replace references to the static data
member with the constant used to initialize them.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me