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: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 May 2004 05:32:16 -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 bangerth at dealii dot org 2004-05-08 05:32 -------
It should be, but wasn't always. You can find numerous PRs on it not being
inlined in ?: expressions. This was fixed for 3.4 and maybe even some
3.3.x release. On the other hand, the compiler has to emit a definition
in each translation unit since it is of course allowed to take the address
of such a member variable.
However, even if it were always inlined: putting the definition into a header
file would be an ODR violation.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10634