This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/10634] in-class initialization of static data members no longer allowed
- From: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 May 2004 01:08:11 -0000
- Subject: [Bug c++/10634] in-class initialization of static data members no longer allowed
- References: <20030506010600.10634.pgonzalez@bluel.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From giovannibajo at libero dot it 2004-05-08 01:08 -------
Subject: Re: in-class initialization of static data members no longer allowed
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? A static const integral variable should be always inlined, to the
best of my knowledge. This might be just a deficiency in the optimizers.
Giovanni Bajo
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10634