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: PR c/44774 -Werror=edantic

On 22 April 2012 19:25, Gabriel Dos Reis <> wrote:
> On Sun, Apr 22, 2012 at 10:50 AM, Manuel López-Ibáñez
> <> wrote:
>> This patch makes Wpedantic the canonical form of -pedantic. This makes
>> -Wno-pedantic, -Werror=pedantic, #pragma diagnostics and other parts
>> of the diagnostic machinery that expect warning options to start with
>> -W, work with -Wpedantic.
>> I did not touch -pedantic-errors, because it is not exactly equivalent
>> to -Werror=pedantic. The fix there may be to have a new -Wpedantic-all
>> that controls -Wpedantic + all the uncontrollable pedwarns, then
>> -Werror=pedantic-all would be exactly equivalent to -pedantic-errors.
>> But apart from consistency, I don't see much benefit, so I am not
>> going to work on that.
>> Bootstrapped + tested with enable-languages=all,objc++,ada.
>> OK?
> OK.
> The longer-term fix is to eliminate the distinction between
> -pedantic-errors and -Werror=pedantic.

I agree on this in principle. However, from the comments of Joseph in
the PR, it is unclear in which direction the implementation should go.
Quoting Joseph:

"pedwarn" is simply a GCC-internal function name for diagnosing
constraint violations and should
not be allowed to influence command-line option names.  -pedantic-errors
means something like -Werror=standard-required-diagnostics and a pedwarn
enabled by default is a standard-required diagnostic enabled by default
(as opposed to a warning enabled by default which is a
non-standard-required diagnostic enabled by default).  There is no
particular reason to allow people to disable standard-required default
diagnostics as a group separately from non-standard-required ones; think
about more useful classifications of the existing enabled-by-default
diagnostics to work out suitable option names for disabling them."

Which seems to suggest that we add an option name for each pedwarn
enabled by default. Is this also what you suggest?



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