This is the mail archive of the
mailing list for the GCC project.
Re: Fix for PR/13358
> Date: Fri, 23 Jan 2004 15:09:36 -0500 (EST)
> From: Jack Lloyd <firstname.lastname@example.org>
> On 23 Jan 2004, Geoff Keating wrote:
> > Note that the diagnostic is required in ISO C++ for constants that
> > aren't decimal, so this should probably key off -pedantic (which is on
> > by default, so the diagnostic should be produced by default) for the
> > case of octal and hex constants.
> Yes, ISO C++ 2.13.1 ignores the possiblity that something larger than long
> might exist. So in theory -pedantic would be the thing to use.
> Practically though, this is a problem. Currently G++ uses -pedantic-errors
> by default, and there is no such thing as -no-pedantic (ie, -pedantic isn't
> just the default, there is AFAIK no way to turn it off). So keying it off
> -pedantic should work for C, but not C++. Rather than use two different
> methods for C and C++, it seems better to use -Wno-long-long, which is
> fairly explicit (in fact when I first ran into this problem in 3.3 the
> first thing I tried was -Wno-long-long since the docs made it sound like
> this was something it would turn off), and relatively fine grained
> (compare: -fpermissive -w). -Wlong-long is also on by default, so a user
> has to turn it off explicitely is they want long longs in !C99. I consider
> this acceptable behavior, but then again I don't have commit privs either.
I have no objection, but probably a C++ maintainer should comment.
- Geoffrey Keating <email@example.com>