This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11393] Initializer of static const float class member is not legal in c++98
- From: "rearnsha at arm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Jul 2003 17:06:14 -0000
- Subject: [Bug c++/11393] Initializer of static const float class member is not legal in c++98
- References: <20030701172459.11393.rearnsha@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11393
------- Additional Comments From rearnsha at arm dot com 2003-07-02 17:06 -------
Subject: Re: Initializer of static const float class
member is not legal in c++98
> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11393
>
>
>
> ------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-02 16:47 -------
> Subject: Re: Initializer of static const float class member is not legal in c++98
>
> From <http://gcc.gnu.org/onlinedocs/gcc/Standards.html>:
> To select this standard in GCC, use one of the options -ansi, -std=c89
> or -std=iso9899:1990; to obtain all the diagnostics required by the
> standard, you should also specify -pedantic (or -pedantic-errors if you
> want them to be errors rather than warnings). See Options Controlling
> C Dialect
>
Well, for starters C++ isn't a C dialect. For seconds, it really doesn't
make sense to me that, given I can type
-std=gnu89
to get GNU extensions,
-std=c89
doesn't give me (at the very least) warnings about GNU extensions. Why
have the option at all?
We should just make the compiler use gnu89 (or gnu99, or whatever) as the
default, and have -std=c89 *mean* c89 code not something else.
Even more perverse is that
-std=gnu89 -pedantic
gives me warnings about ISO-isms.
R.