This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: libstdc++/3738


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]