From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28151 invoked by alias); 2 Jul 2003 23:28:07 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 28142 invoked by alias); 2 Jul 2003 23:28:07 -0000 Date: Wed, 02 Jul 2003 23:28:00 -0000 Message-ID: <20030702232807.28141.qmail@sources.redhat.com> From: "jsm28 at cam dot ac dot uk" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20030701172459.11393.rearnsha@gcc.gnu.org> References: <20030701172459.11393.rearnsha@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/11393] Initializer of static const float class member is not legal in c++98 X-Bugzilla-Reason: CC X-SW-Source: 2003-07/txt/msg00226.txt.bz2 List-Id: 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 jsm28 at cam dot ac dot uk 2003-07-02 23:28 ------- Subject: Re: Initializer of static const float class member is not legal in c++98 On Wed, 2 Jul 2003, rearnsha at arm dot com wrote: > to get GNU extensions, > > -std=c89 > > doesn't give me (at the very least) warnings about GNU extensions. Why > have the option at all? To accept all code the standard requires us to accept, with the standard semantics (e.g., enabling trigraphs). > 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. You mean have the -std options imply -pedantic? I think that would be reasonable, to reduce the length of the invocation required for a standard mode. (And if we *don't* allow -ansi -no-pedantic to turn the warnings off again then this would also fix or at least hide a few bugs where standard code is only accepted with -pedantic.) > Even more perverse is that > > -std=gnu89 -pedantic > > gives me warnings about ISO-isms. That is the combination used (implicitly) in GCC bootstrap, with -pedantic to warn about nonportable usages in GCC but without needing to mess with feature test macros (which -std=c89 would imply, since it also puts the headers into standards mode). The manual explains the concept of "base standard" behind the warnings in such cases.