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: 6 May 2004 09:10:38 -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-06 09:10 -------
Thank you very much for preparing this patch.
Some notes:
- Please use -c3 -p to generate the diff
- The documentation patch needs to be more informative. You must specify
exactly what you mean (mention "in-class member initialization" instead of
being generic), and that the option is on by the default.
- The hunk in parser.c looks invalid. Under -fno-strict-const you are allowing
cast expressions within constant expressions. This is wrong, and might break
code like f<(char*)0x1234> (which is invalid). You must check this. Maybe you
could try a full testsuite run with -fno-strict-const and see if it catches
problems.
- Looks like you handled only C-style casts (char*), but reinterpret_cast could
probably be used as well.
The patch needs to be submitted to gcc-patches@gcc.gnu.org. Prepare also a
ChangeLog entry and a testcase, and in the mail be descriptive about what you
are trying to do. Mark it with [C++ PATCH] in the topic. Also specify what
platform you tested the patch on with a bootstrap + testsuite run. See
http://gcc.gnu.org/contribute.html for more details.
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10634