This is the mail archive of the gcc-patches@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: [PATCH doc] Explain options precedence and difference between -pedantic-errors and -Werror=pedantic


On Sat, 18 Oct 2014, Manuel López-Ibáñez wrote:

> The previous version also does not match your description. You are saying that
> 
> -Wpedantic = warning(OPT_Wpedantic) + pedwarn(OPT_Wpedantic)
> and -pedantic-errors = pedwarn(OPT_Wpedantic).+ pedwarn(0)
> 
> The current version says that
> 
> -Wpedantic = warning(OPT_Wpedantic) + pedwarn(OPT_Wpedantic)
> and -pedantic-errors = warning(OPT_Wpedantic) + pedwarn(OPT_Wpedantic)
> 
> My proposal says that:
> 
> -Wpedantic = warning(OPT_Wpedantic) + pedwarn(OPT_Wpedantic)
> and -pedantic-errors = warning(OPT_Wpedantic) + pedwarn(OPT_Wpedantic)
> + pedwarn(0)

None of those three descriptions seems helpful here.

The point of -pedantic is to give a diagnostic whenever the standard 
requires one (and possibly in some other cases).  The point of 
-Werror=pedantic is to give an error for diagnostics enabled by -pedantic 
(whether or not the standard requires a diagnostic in those cases, and 
whether or not the standard requires successful translation in those 
cases).  The point of -pedantic-errors is to give an error whenever the 
standard requires a diagnostic (and possibly in some other cases, but not 
cases where the standard requires successful translation).

-- 
Joseph S. Myers
joseph@codesourcery.com

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