public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH doc] Explain options precedence and difference between -pedantic-errors and -Werror=pedantic
@ 2014-10-17 18:40 Manuel López-Ibáñez
  2014-10-17 20:53 ` Joseph S. Myers
  0 siblings, 1 reply; 10+ messages in thread
From: Manuel López-Ibáñez @ 2014-10-17 18:40 UTC (permalink / raw)
  To: Gcc Patch List, Joseph S. Myers, Gerald Pfeifer

While writing the guidelines
https://gcc.gnu.org/wiki/Better_Diagnostics#guidelines , I noticed
that we never explain the precedence rules between conflicting
options. Also, the description of -pedantic-errors could be more
precise.

OK?


Index: invoke.texi
===================================================================
--- invoke.texi    (revision 215973)
+++ invoke.texi    (working copy)
@@ -3263,6 +3263,15 @@
 language-specific options also refer to @ref{C++ Dialect Options} and
 @ref{Objective-C and Objective-C++ Dialect Options}.

+Some options, such as @option{-Wall} and @option{-Wextra}, turn on other
+options, such as @option{-Wunused}, which may turn on further options,
+such as @option{-Wunused-value}. The combined effect of positive and
+negative forms is that more specific options have priority over less
+specific ones, independently of their position in the command-line. For
+options of the same specificity, the last one takes effect. Options
+enabled or disabled via pragmas (@pxref{Diagnostic Pragmas}) take effect
+as if they appeared at the end of the command-line.
+
 When an unrecognized warning option is requested (e.g.,
 @option{-Wunknown-warning}), GCC emits a diagnostic stating
 that the option is not recognized.  However, if the @option{-Wno-} form
@@ -3318,8 +3327,8 @@

 @item -pedantic-errors
 @opindex pedantic-errors
-Like @option{-Wpedantic}, except that errors are produced rather than
-warnings.
+This is equivalent to @option{-Werror=pedantic} plus making into errors
+a few warnings that are not controlled by @option{-Wpedantic}.

 @item -Wall
 @opindex Wall

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-10-21 21:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-17 18:40 [PATCH doc] Explain options precedence and difference between -pedantic-errors and -Werror=pedantic Manuel López-Ibáñez
2014-10-17 20:53 ` Joseph S. Myers
2014-10-17 23:43   ` Manuel López-Ibáñez
2014-10-18  0:04     ` Joseph S. Myers
2014-10-18  0:14       ` Manuel López-Ibáñez
2014-10-18  0:41         ` Joseph S. Myers
2014-10-18 17:03           ` Manuel López-Ibáñez
2014-10-19 16:14             ` Joseph S. Myers
2014-10-21 18:26               ` Manuel López-Ibáñez
2014-10-21 22:01                 ` Joseph S. Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).