[Bug c++/10634] in-class initialization of static data members no longer allowed

gdr at integrable-solutions dot net gcc-bugzilla@gcc.gnu.org
Sat May 8 15:55:00 GMT 2004


------- Additional Comments From gdr at integrable-solutions dot net  2004-05-08 15:54 -------
Subject: Re:  in-class initialization of static data members no longer allowed

"giovannibajo at libero dot it" <gcc-bugzilla@gcc.gnu.org> writes:

| pgonzalez at bluel dot com wrote:
| 
| > I originally solved the problem simply by moving the definition to the
| > .cpp file.  However, in that case the constant address can no longer
| > be expanded inline and is replaced with an external reference.
| 
| Why is that?

That can happen when its address is taken, either directly or through
binding to a reference (this is less "visible" to the the programmer).

This integral constant hack should never have been there -- IMO, it
causes more confusion than anything else, but that is just me.




-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10634



More information about the Gcc-bugs mailing list