static const double pi = 3.1415;
Kai Henningsen
kaih@khms.westfalen.de
Wed Feb 19 08:52:00 GMT 2003
mark@codesourcery.com (Mark Mitchell) wrote on 17.02.03 in <43620000.1045552786@warlock.codesourcery.com>:
> --On Saturday, February 15, 2003 04:13:24 PM -0800 Mike Stump
> <mrs@apple.com> wrote:
>
> > Thoughts? I have a patch to do this, if we like the general idea.
>
> I don't believe this was ever a GNU language feature as such; it was never
> documented as an extension to my knowledge. It was just one of many, many
> places where we allowed more code to compile than we should have.
>
> If people really feel that we need to add this back in, we can do that with
> -fpermissive -- but the only exception we should make is for floating-point
> types, not aggregates, etc. That latter case cannot really be made to work
> reliably without major work.
Note I'm not arguing for or against any particular extension here.
That said - what would be hard about allowing to initialize PODs with
constant expressions? Or about any static member variables, for that
matter - I assume there must be a reason to disallow for what are in
effect global variables inside a class namespace what is allowed for
global variables outside a class namespace, but it is certainly not
obvious to me what reason that would be. (And it's certainly an ugly
wart.)
MfG Kai
More information about the Gcc
mailing list