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: Changes in C++ FE regarding pedwarns to be errors are harmful


On 12/01/2008, Manuel López-Ibáñez <lopezibanez@gmail.com> wrote:
>
> Here is an initial patch implementing some of your proposals. I used
> pederror as the name of the function. That is, it is an error unless
> fpermissive is given.

Ah, very fast! :-)
I was just starting somethign similar, I provisionally used the name
permerror, with this comment:

/* A conformance error: issues an error unless -fpermissive was
   given on the command line, in which case it issues a warning.  Use
   this for diagnostics required by the relevant language standard,
   but which need to be downgradable for non-conformant code.  */
void
permerror (const char *gmsgid, ...)

I don't think the name should involve "ped" or pedantic, since it's
not related to -pedantic, the semantics are those described by the
-fpermissive docs:

       -fpermissive
           Downgrade some diagnostics about nonconformant code from errors to
           warnings.  Thus, using -fpermissive will allow some nonconforming
           code to compile.

These errors should be independent of -pedantic* unless the if
(pedantic) check is also present in the code, but that's a special
case.  Have I understood the intention correctly?

I think the name matters, otherwise you will have to write more long
mails explaining why the semantics don't match the name :-)
(thanks for those mails btw, they helped me a lot)
I don't really like the name permerror either though, relaxable_error
is accurate but not great either.

Thanks for doing this - I agree with your other decisions about what
should be a pedward or a pederror/whatever in e.g. lex.c and parser.c

Jon


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