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: [PATCH doc] Explain options precedence and difference between -pedantic-errors and -Werror=pedantic

On 18 October 2014 02:13, Joseph S. Myers <> wrote:
> On Sat, 18 Oct 2014, Manuel López-Ibáñez wrote:
>> Can we make "possibly in some other cases" more concrete? Otherwise,
> Cases where something about the code is not defined by the base standard,
> but a diagnostic is not required.  -pedantic may give a warning for such
> cases.  -pedantic-errors may give an error *if* there is compile-time
> undefined behavior (not if the not-definedness is something other than
> undefined behavior, or is undefined behavior only if the code in question
> is executed, although it will still give a warning for such cases if
> -pedantic does).

What about this version?

Give an error whenever the @dfn{base standard} (see @option{-Wpedantic})
requires a diagnostic, in cases where there is undefined behavior at
and in some other cases that do not prevent compilation of programs
that are valid according to the standard.
This is not equivalent to @option{-Werror=pedantic}, since there are
errors enabled by this option
and not enabled by the latter and vice versa.



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