This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
static const double pi = 3.1415;
- From: Mike Stump <mrs at apple dot com>
- To: gcc at gcc dot gnu dot org
- Date: Sat, 15 Feb 2003 16:13:24 -0800
- Subject: static const double pi = 3.1415;
Ack! I think this patch is going to screw the 3.3 release:
2002-12-09 Mark Mitchell <mark@codesourcery.com>
* NEWS: Document removal of in-class initialization extension
for
static data members of non-arithmetic, non-enumeration type.
* decl.c (check_static_variable_definition): Do not allow that
extension.
* decl2.c (grokfield): Do not call digest_init when processing
templates.
While technically correct, we generally pedwarn such things for a year
or two or five to let people fix their broken code. Going straight
from GNU language feature to error will impact people. If not pedwarn,
then -fpermissive.
Thoughts? I have a patch to do this, if we like the general idea.
Remind me, why was it really important to not let people use doubles?
class A {
static const double pi = 3.1415;
} a;
This is taken from user code, Finder_FE. :-(