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]

Re: static const double pi = 3.1415;


mark at codesourcery dot com (Mark Mitchell)  wrote on 17.02.03 in <43620000 dot 1045552786 at warlock dot codesourcery dot com>:

> --On Saturday, February 15, 2003 04:13:24 PM -0800 Mike Stump
> <mrs at apple dot 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


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