This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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. :-(


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]