This is the mail archive of the
mailing list for the GCC project.
Re: Changes in C++ FE regarding pedwarns to be errors are harmful
Ian Lance Taylor wrote:
> "Manuel LÃpez-IbÃÃez" <firstname.lastname@example.org> writes:
>> Of course there is a third option:
>> * Make pedwarns warnings by default unless -Werror or
>> --pedantic-errors are given (just like the C front-end).
> This makes sense to me. I have never understood why it is a good idea
> for the C++ and C frontends to differ in this way.
I think Jason's input would be helpful. I remember having a discussion
about this years ago (1998?), but I don't remember the complete
rationale. I think the idea was that we wanted many of these things
(ugly old ARM-era C++ things) to be errors, but didn't want to make it
impossible to compile old code. They're not "pedantic" in the sense
that you only care if you're trying extremely hard to be ISO-conformant;
they're things no sane C++ programmer would do at this point, but we
want to support for legacy C++ code.
I don't see any a priori problem with changing to match the C front end.
We could of course change some of the pedwarns into errors if we really
think they ought to be errors. Or, some of them could be ordinary
warnings when not -pednatic, and pedwarns when -pedantic.
(650) 331-3385 x713