This is the mail archive of the 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: Why does -pedantic make long long an error in C++? (Mark Mitchell)  wrote on 13.08.03 in <>:

> On Wed, 2003-08-13 at 16:12, Joe Buck wrote:
> > On Wed, Aug 13, 2003 at 06:29:52PM -0400, Andrew Pinski wrote:
> > > I found an email from you that says the opposite (back in 1993 when
> > > 2.95 was not even being thought of):
> > > <>
> >
> > Ah, but I was young and stupid then. :-)
> I think Jason was the architect of most of this code, but I could be
> wrong.
> Before my patch, -pedantic issued *warnings* where the compiler would
> issue *errors* without -pedantic.  In other words, -pedantic made the
> compiler *less strict*.
> The C++ front end has for some time treated "pedwarn" as equivalent to
> "error" -- unless you say "-fpermissive".  The C front end doesn't have
> this "-fpermissive" thing, and "pedwarn" is just a warning, unless you
> say "-pedantic-errors".
> In other words, the C++ front end is in "-pedantic-errors" mode by
> default.
> This level of complexity seems far more than necessary to me, but that
> is how it is.

It seems to me that the main problem here is that the options seem far  
less orthogonal than they should be, and thus users will be confused.

As a user, here's a possible definition that I would think sensible:

-pedantic causes additional warnings, optimally marked so one knows they
          come from -pedantic; however, it never turns an error into a
          warning (why would it even want to, anyway?(1))
-pedantic-errors causes the *exact* same messages, except now they are
-permissive is much like -traditional, in that it allows the compiler to
            handle stuff that it would originally flag as errors;
            essentially, it really is a (sub-)dialect-choosing option

(1) It is unclear to me why one would want to have -pedantic do *anything*  
to a condition that already causes an error without -pedantic. That seems  
to me to be a misuse of the concept. The only variant I could see is where  
we are talking about different dialects, but then again that should mean  
the error applies to one dialect variant and the pedantic message to a  
different one, and again there should be no conflict.

MfG Kai

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