From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexandre Oliva To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org Subject: Re: libstdc++/3738 Date: Fri, 24 Aug 2001 03:46:00 -0000 Message-id: <20010824104603.3649.qmail@sourceware.cygnus.com> X-SW-Source: 2001-08/msg00622.html List-Id: The following reply was made to PR libstdc++/3738; it has been noted by GNATS. From: Alexandre Oliva To: Luca.Formaggia@epfl.ch Cc: luca.formaggia@epfl.ch, gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org Subject: Re: libstdc++/3738 Date: 24 Aug 2001 07:42:06 -0300 On Aug 24, 2001, Luca Formaggia 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