This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/10086: static const int unresolved in ? : construct
- From: Wolfgang Bangerth <bangerth at ticam dot utexas dot edu>
- To: Chris Kappler <chrisk at mysticlabs dot com>
- Cc: gcc-bugs at gcc dot gnu dot org, <gcc-gnats at gcc dot gnu dot org>
- Date: Sat, 15 Mar 2003 11:03:22 -0600 (CST)
- Subject: Re: c++/10086: static const int unresolved in ? : construct
> I do not agree.
That doesn't make it right. The standard says that you need to have
definitions of static variables like
const int Base::A;
and it allows the compiler to make use of these variables without using
the provided constant initializers. Just because it uses them in one
context and not in another doesn't mean you should rely on that.
W.
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth at ticam dot utexas dot edu
www: http://www.ticam.utexas.edu/~bangerth/