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]

[PATCH] PR documentation/30330: Ensure -Wfoo and -Wno-foo @opindex exist.


This ensures we have both positive and negative forms of -W warnings, except where they aren't supported (-Wno, -Wno-larger-than-<len>). I didn't touch cppopts.texi.

make info and make dvi work. My changes are public domain. Please reply-all.

Chris

2007-01-10 Chris Pickett <chris.pickett@mail.mcgill.ca>

        PR documentation/30330
        * doc/invoke.texi: Ensure -Wfoo and -Wno-foo @opindex exist.

Index: doc/invoke.texi
===================================================================
--- doc/invoke.texi	(revision 120652)
+++ doc/invoke.texi	(working copy)
@@ -1698,6 +1698,7 @@
 
 @item -Wabi @r{(C++ only)}
 @opindex Wabi
+@opindex Wno-abi
 Warn when G++ generates code that is probably not compatible with the
 vendor-neutral C++ ABI@.  Although an effort has been made to warn about
 all such cases, there are probably some cases that are not warned about,
@@ -1797,18 +1798,21 @@
 
 @item -Wctor-dtor-privacy @r{(C++ only)}
 @opindex Wctor-dtor-privacy
+@opindex Wno-ctor-dtor-privacy
 Warn when a class seems unusable because all the constructors or
 destructors in that class are private, and it has neither friends nor
 public static member functions.
 
 @item -Wnon-virtual-dtor @r{(C++ only)}
 @opindex Wnon-virtual-dtor
+@opindex Wno-non-virtual-dtor
 Warn when a class appears to be polymorphic, thereby requiring a virtual
 destructor, yet it declares a non-virtual one.  This warning is also
 enabled if -Weffc++ is specified.
 
 @item -Wreorder @r{(C++ only)}
 @opindex Wreorder
+@opindex Wno-reorder
 @cindex reordering, warning
 @cindex warning for reordering of member initializers
 Warn when the order of member initializers given in the code does not
@@ -1832,6 +1836,7 @@
 @table @gcctabopt
 @item -Weffc++ @r{(C++ only)}
 @opindex Weffc++
+@opindex Wno-effc++
 Warn about violations of the following style guidelines from Scott Meyers'
 @cite{Effective C++} book:
 
@@ -1872,11 +1877,13 @@
 to filter out those warnings.
 
 @item -Wno-deprecated @r{(C++ only)}
+@opindex Wdeprecated
 @opindex Wno-deprecated
 Do not warn about usage of deprecated features.  @xref{Deprecated Features}.
 
 @item -Wstrict-null-sentinel @r{(C++ only)}
 @opindex Wstrict-null-sentinel
+@opindex Wno-strict-null-sentinel
 Warn also about the use of an uncasted @code{NULL} as sentinel.  When
 compiling only with GCC this is a valid sentinel, as @code{NULL} is defined
 to @code{__null}.  Although it is a null pointer constant not a null pointer,
@@ -1884,6 +1891,7 @@
 not portable across different compilers.
 
 @item -Wno-non-template-friend @r{(C++ only)}
+@opindex Wnon-template-friend
 @opindex Wno-non-template-friend
 Disable warnings when non-templatized friend functions are declared
 within a template.  Since the advent of explicit template specification
@@ -1901,6 +1909,7 @@
 
 @item -Wold-style-cast @r{(C++ only)}
 @opindex Wold-style-cast
+@opindex Wno-old-style-cast
 Warn if an old-style (C-style) cast to a non-void type is used within
 a C++ program.  The new-style casts (@samp{dynamic_cast},
 @samp{static_cast}, @samp{reinterpret_cast}, and @samp{const_cast}) are
@@ -1908,6 +1917,7 @@
 
 @item -Woverloaded-virtual @r{(C++ only)}
 @opindex Woverloaded-virtual
+@opindex Wno-overloaded-virtual
 @cindex overloaded virtual fn, warning
 @cindex warning for overloaded virtual fn
 Warn when a function declaration hides virtual functions from a
@@ -1934,12 +1944,14 @@
 will fail to compile.
 
 @item -Wno-pmf-conversions @r{(C++ only)}
+@opindex Wpmf-conversions
 @opindex Wno-pmf-conversions
 Disable the diagnostic for converting a bound pointer to member function
 to a plain pointer.
 
 @item -Wsign-promo @r{(C++ only)}
 @opindex Wsign-promo
+@opindex Wno-sign-promo
 Warn when overload resolution chooses a promotion from unsigned or
 enumerated type to a signed type, over a conversion to an unsigned type of
 the same size.  Previous versions of G++ would try to preserve
@@ -2179,10 +2191,12 @@
 
 @item -Wassign-intercept
 @opindex Wassign-intercept
+@opindex Wno-assign-intercept
 Warn whenever an Objective-C assignment is being intercepted by the
 garbage collector.
 
 @item -Wno-protocol
+@opindex Wprotocol
 @opindex Wno-protocol
 If a class is declared to implement a protocol, a warning is issued for
 every method in the protocol that is not implemented by the class.  The
@@ -2194,6 +2208,7 @@
 
 @item -Wselector
 @opindex Wselector
+@opindex Wno-selector
 Warn if multiple methods of different types for the same selector are
 found during compilation.  The check is performed on the list of methods
 in the final stage of compilation.  Additionally, a check is performed
@@ -2207,6 +2222,7 @@
 
 @item -Wstrict-selector-match
 @opindex Wstrict-selector-match
+@opindex Wno-strict-selector-match
 Warn if multiple methods with differing argument and/or return types are
 found for a given selector when attempting to send a message using this
 selector to a receiver of type @code{id} or @code{Class}.  When this flag
@@ -2216,6 +2232,7 @@
 
 @item -Wundeclared-selector
 @opindex Wundeclared-selector
+@opindex Wno-undeclared-selector
 Warn if a @code{@@selector(@dots{})} expression referring to an
 undeclared selector is found.  A selector is considered undeclared if no
 method with that name has been declared before the
@@ -2308,6 +2325,7 @@
 @cindex syntax checking
 @item -fsyntax-only
 @opindex fsyntax-only
+@opindex fno-syntax-only
 Check the code for syntax errors, but don't do anything beyond that.
 
 @item -pedantic
@@ -2361,11 +2379,13 @@
 Inhibit all warning messages.
 
 @item -Wno-import
+@opindex Wimport
 @opindex Wno-import
 Inhibit warning messages about the use of @samp{#import}.
 
 @item -Wchar-subscripts
 @opindex Wchar-subscripts
+@opindex Wno-char-subscripts
 Warn if an array subscript has type @code{char}.  This is a common cause
 of error, as programmers often forget that this type is signed on some
 machines.
@@ -2373,18 +2393,21 @@
 
 @item -Wcomment
 @opindex Wcomment
+@opindex Wno-comment
 Warn whenever a comment-start sequence @samp{/*} appears in a @samp{/*}
 comment, or whenever a Backslash-Newline appears in a @samp{//} comment.
 This warning is enabled by @option{-Wall}.
 
 @item -Wfatal-errors
 @opindex Wfatal-errors
+@opindex Wno-fatal-errors
 This option causes the compiler to abort compilation on the first error
 occurred rather than trying to keep going and printing further error
 messages.
 
 @item -Wformat
 @opindex Wformat
+@opindex Wno-format
 @opindex ffreestanding
 @opindex fno-builtin
 Check calls to @code{printf} and @code{scanf}, etc., to make sure that
@@ -2421,10 +2444,12 @@
 
 @item -Wformat-y2k
 @opindex Wformat-y2k
+@opindex Wno-format-y2k
 If @option{-Wformat} is specified, also warn about @code{strftime}
 formats which may yield only a two-digit year.
 
 @item -Wno-format-extra-args
+@opindex Wformat-extra-args
 @opindex Wno-format-extra-args
 If @option{-Wformat} is specified, do not warn about excess arguments to a
 @code{printf} or @code{scanf} format function.  The C standard specifies
@@ -2439,18 +2464,21 @@
 Unix Specification says that such unused arguments are allowed.
 
 @item -Wno-format-zero-length
+@opindex Wformat-zero-length
 @opindex Wno-format-zero-length
 If @option{-Wformat} is specified, do not warn about zero-length formats.
 The C standard specifies that zero-length formats are allowed.
 
 @item -Wformat-nonliteral
 @opindex Wformat-nonliteral
+@opindex Wno-format-nonliteral
 If @option{-Wformat} is specified, also warn if the format string is not a
 string literal and so cannot be checked, unless the format function
 takes its format arguments as a @code{va_list}.
 
 @item -Wformat-security
 @opindex Wformat-security
+@opindex Wno-format-security
 If @option{-Wformat} is specified, also warn about uses of format
 functions that represent possible security problems.  At present, this
 warns about calls to @code{printf} and @code{scanf} functions where the
@@ -2463,12 +2491,14 @@
 
 @item -Wformat=2
 @opindex Wformat=2
+@opindex Wno-format=2
 Enable @option{-Wformat} plus format checks not included in
 @option{-Wformat}.  Currently equivalent to @samp{-Wformat
 -Wformat-nonliteral -Wformat-security -Wformat-y2k}.
 
 @item -Wnonnull
 @opindex Wnonnull
+@opindex Wno-nonnull
 Warn about passing a null pointer for arguments marked as
 requiring a non-null value by the @code{nonnull} function attribute.
 
@@ -2477,6 +2507,7 @@
 
 @item -Winit-self @r{(C, C++, Objective-C and Objective-C++ only)}
 @opindex Winit-self
+@opindex Wno-init-self
 Warn about uninitialized variables which are initialized with themselves.
 Note this option can only be used with the @option{-Wuninitialized} option,
 which in turn only works with @option{-O1} and above.
@@ -2495,12 +2526,14 @@
 
 @item -Wimplicit-int
 @opindex Wimplicit-int
+@opindex Wno-implicit-int
 Warn when a declaration does not specify a type.
 This warning is enabled by @option{-Wall}.
 
 @item -Wimplicit-function-declaration
 @itemx -Werror-implicit-function-declaration
 @opindex Wimplicit-function-declaration
+@opindex Wno-implicit-function-declaration
 @opindex Werror-implicit-function-declaration
 Give a warning (or error) whenever a function is used before being
 declared.  The form @option{-Wno-error-implicit-function-declaration}
@@ -2509,11 +2542,13 @@
 
 @item -Wimplicit
 @opindex Wimplicit
+@opindex Wno-implicit
 Same as @option{-Wimplicit-int} and @option{-Wimplicit-function-declaration}.
 This warning is enabled by @option{-Wall}.
 
 @item -Wmain
 @opindex Wmain
+@opindex Wno-main
 Warn if the type of @samp{main} is suspicious.  @samp{main} should be a
 function with external linkage, returning int, taking either zero
 arguments, two, or three arguments of appropriate types.
@@ -2521,6 +2556,7 @@
 
 @item -Wmissing-braces
 @opindex Wmissing-braces
+@opindex Wno-missing-braces
 Warn if an aggregate or union initializer is not fully bracketed.  In
 the following example, the initializer for @samp{a} is not fully
 bracketed, but that for @samp{b} is fully bracketed.
@@ -2534,10 +2570,12 @@
 
 @item -Wmissing-include-dirs @r{(C, C++, Objective-C and Objective-C++ only)}
 @opindex Wmissing-include-dirs
+@opindex Wno-missing-include-dirs
 Warn if a user-supplied include directory does not exist.
 
 @item -Wparentheses
 @opindex Wparentheses
+@opindex Wno-parentheses
 Warn if parentheses are omitted in certain contexts, such
 as when there is an assignment in a context where a truth value
 is expected, or when operators are nested whose precedence people
@@ -2591,6 +2629,7 @@
 
 @item -Wsequence-point
 @opindex Wsequence-point
+@opindex Wno-sequence-point
 Warn about code that may have undefined semantics because of violations
 of sequence point rules in the C and C++ standards.
 
@@ -2636,6 +2675,7 @@
 
 @item -Wreturn-type
 @opindex Wreturn-type
+@opindex Wno-return-type
 Warn whenever a function is defined with a return-type that defaults to
 @code{int}.  Also warn about any @code{return} statement with no
 return-value in a function whose return-type is not @code{void}.
@@ -2654,6 +2694,7 @@
 
 @item -Wswitch
 @opindex Wswitch
+@opindex Wno-switch
 Warn whenever a @code{switch} statement has an index of enumerated type
 and lacks a @code{case} for one or more of the named codes of that
 enumeration.  (The presence of a @code{default} label prevents this
@@ -2663,11 +2704,13 @@
 
 @item -Wswitch-default
 @opindex Wswitch-switch
+@opindex Wno-switch-switch
 Warn whenever a @code{switch} statement does not have a @code{default}
 case.
 
 @item -Wswitch-enum
 @opindex Wswitch-enum
+@opindex Wno-switch-enum
 Warn whenever a @code{switch} statement has an index of enumerated type
 and lacks a @code{case} for one or more of the named codes of that
 enumeration.  @code{case} labels outside the enumeration range also
@@ -2675,18 +2718,21 @@
 
 @item -Wtrigraphs
 @opindex Wtrigraphs
+@opindex Wno-trigraphs
 Warn if any trigraphs are encountered that might change the meaning of
 the program (trigraphs within comments are not warned about).
 This warning is enabled by @option{-Wall}.
 
 @item -Wunused-function
 @opindex Wunused-function
+@opindex Wno-unused-function
 Warn whenever a static function is declared but not defined or a
 non-inline static function is unused.
 This warning is enabled by @option{-Wall}.
 
 @item -Wunused-label
 @opindex Wunused-label
+@opindex Wno-unused-label
 Warn whenever a label is declared but not used.
 This warning is enabled by @option{-Wall}.
 
@@ -2695,6 +2741,7 @@
 
 @item -Wunused-parameter
 @opindex Wunused-parameter
+@opindex Wno-unused-parameter
 Warn whenever a function parameter is unused aside from its declaration.
 
 To suppress this warning use the @samp{unused} attribute
@@ -2702,6 +2749,7 @@
 
 @item -Wunused-variable
 @opindex Wunused-variable
+@opindex Wno-unused-variable
 Warn whenever a local variable or non-constant static variable is unused
 aside from its declaration.
 This warning is enabled by @option{-Wall}.
@@ -2711,6 +2759,7 @@
 
 @item -Wunused-value
 @opindex Wunused-value
+@opindex Wno-unused-value
 Warn whenever a statement computes a result that is explicitly not used.
 This warning is enabled by @option{-Wall}.
 
@@ -2718,6 +2767,7 @@
 
 @item -Wunused
 @opindex Wunused
+@opindex Wno-unused
 All the above @option{-Wunused} options combined.
 
 In order to get a warning about an unused function parameter, you must
@@ -2726,6 +2776,7 @@
 
 @item -Wuninitialized
 @opindex Wuninitialized
+@opindex Wno-uninitialized
 Warn if an automatic variable is used without first being initialized or
 if a variable may be clobbered by a @code{setjmp} call.
 
@@ -2809,6 +2860,7 @@
 
 @item -Wunknown-pragmas
 @opindex Wunknown-pragmas
+@opindex Wno-unknown-pragmas
 @cindex warning for unknown pragmas
 @cindex unknown pragmas, warning
 @cindex pragmas, warning of unknown
@@ -2818,14 +2870,15 @@
 the warnings were only enabled by the @option{-Wall} command line option.
 
 @item -Wno-pragmas
+@opindex Wpragmas
 @opindex Wno-pragmas
-@opindex Wpragmas
 Do not warn about misuses of pragmas, such as incorrect parameters,
 invalid syntax, or conflicts between pragmas.  See also
 @samp{-Wunknown-pragmas}.
 
 @item -Wstrict-aliasing
 @opindex Wstrict-aliasing
+@opindex Wno-strict-aliasing
 This option is only active when @option{-fstrict-aliasing} is active.
 It warns about code which might break the strict aliasing rules that the
 compiler is using for optimization.  The warning does not catch all
@@ -2834,6 +2887,7 @@
 
 @item -Wstrict-aliasing=2
 @opindex Wstrict-aliasing=2
+@opindex Wno-strict-aliasing=2
 This option is only active when @option{-fstrict-aliasing} is active.
 It warns about code which might break the strict aliasing rules that the
 compiler is using for optimization.  This warning catches more cases than
@@ -2842,6 +2896,7 @@
 
 @item -Wall
 @opindex Wall
+@opindex Wno-all
 All of the above @samp{-W} options combined.  This enables all the
 warnings about constructions that some users consider questionable, and
 that are easy to avoid (or modify to prevent the warning), even in
@@ -2861,9 +2916,11 @@
 @item -Wextra
 @opindex W
 @opindex Wextra
+@opindex Wno-extra
 (This option used to be called @option{-W}.  The older name is still
-supported, but the newer name is more descriptive.)  Print extra warning
-messages for these events:
+supported, but the newer name is more descriptive.  Furthermore,
+@option{-Wno-extra} is supported whereas @option{-Wno} is not.)  Print
+extra warning messages for these events:
 
 @itemize @bullet
 @item
@@ -2960,14 +3017,15 @@
 @end itemize
 
 @item -Wno-div-by-zero
+@opindex Wdiv-by-zero
 @opindex Wno-div-by-zero
-@opindex Wdiv-by-zero
 Do not warn about compile-time integer division by zero.  Floating point
 division by zero is not warned about, as it can be a legitimate way of
 obtaining infinities and NaNs.
 
 @item -Wsystem-headers
 @opindex Wsystem-headers
+@opindex Wno-system-headers
 @cindex warnings from system headers
 @cindex system headers, warnings from
 Print warning messages for constructs found in system header files.
@@ -2981,6 +3039,7 @@
 
 @item -Wfloat-equal
 @opindex Wfloat-equal
+@opindex Wno-float-equal
 Warn if floating point values are used in equality comparisons.
 
 The idea behind this is that sometimes it is convenient (for the
@@ -2996,6 +3055,7 @@
 
 @item -Wtraditional @r{(C only)}
 @opindex Wtraditional
+@opindex Wno-traditional
 Warn about certain constructs that behave differently in traditional and
 ISO C@.  Also warn about ISO C constructs that have no traditional C
 equivalent, and/or problematic constructs which should be avoided.
@@ -3084,6 +3144,7 @@
 
 @item -Wtraditional-conversion @r{(C only)}
 @opindex Wtraditional-conversion
+@opindex Wno-traditional-conversion
 Warn if a prototype causes a type conversion that is different from what
 would happen to the same argument in the absence of a prototype.  This
 includes conversions of fixed point to floating and vice versa, and
@@ -3092,6 +3153,7 @@
 
 @item -Wdeclaration-after-statement @r{(C only)}
 @opindex Wdeclaration-after-statement
+@opindex Wno-declaration-after-statement
 Warn when a declaration is found after a statement in a block.  This
 construct, known from C++, was introduced with ISO C99 and is by default
 allowed in GCC@.  It is not supported by ISO C90 and was not supported by
@@ -3099,24 +3161,28 @@
 
 @item -Wundef
 @opindex Wundef
+@opindex Wno-undef
 Warn if an undefined identifier is evaluated in an @samp{#if} directive.
 
 @item -Wno-endif-labels
+@opindex Wendif-labels
 @opindex Wno-endif-labels
-@opindex Wendif-labels
 Do not warn whenever an @samp{#else} or an @samp{#endif} are followed by text.
 
 @item -Wshadow
 @opindex Wshadow
+@opindex Wno-shadow
 Warn whenever a local variable shadows another local variable, parameter or
 global variable or whenever a built-in function is shadowed.
 
 @item -Wlarger-than-@var{len}
 @opindex Wlarger-than
 Warn whenever an object of larger than @var{len} bytes is defined.
+The negative form @option{-Wno-larger-than-len} is not supported.
 
 @item -Wunsafe-loop-optimizations
 @opindex Wunsafe-loop-optimizations
+@opindex Wno-unsafe-loop-optimizations
 Warn if the loop cannot be optimized because the compiler could not
 assume anything on the bounds of the loop indices.  With
 @option{-funsafe-loop-optimizations} warn if the compiler made
@@ -3124,6 +3190,7 @@
 
 @item -Wpointer-arith
 @opindex Wpointer-arith
+@opindex Wno-pointer-arith
 Warn about anything that depends on the ``size of'' a function type or
 of @code{void}.  GNU C assigns these types a size of 1, for
 convenience in calculations with @code{void *} pointers and pointers
@@ -3131,22 +3198,27 @@
 
 @item -Wbad-function-cast @r{(C only)}
 @opindex Wbad-function-cast
+@opindex Wno-bad-function-cast
 Warn whenever a function call is cast to a non-matching type.
 For example, warn if @code{int malloc()} is cast to @code{anything *}.
 
 @item -Wc++-compat
+@opindex Wc++-compat
+@opindex Wno-c++-compat
 Warn about ISO C constructs that are outside of the common subset of
 ISO C and ISO C++, e.g.@: request for implicit conversion from
 @code{void *} to a pointer to non-@code{void} type.
 
 @item -Wcast-qual
 @opindex Wcast-qual
+@opindex Wno-cast-qual
 Warn whenever a pointer is cast so as to remove a type qualifier from
 the target type.  For example, warn if a @code{const char *} is cast
 to an ordinary @code{char *}.
 
 @item -Wcast-align
 @opindex Wcast-align
+@opindex Wno-cast-align
 Warn whenever a pointer is cast such that the required alignment of the
 target is increased.  For example, warn if a @code{char *} is cast to
 an @code{int *} on machines where integers can only be accessed at
@@ -3154,6 +3226,7 @@
 
 @item -Wwrite-strings
 @opindex Wwrite-strings
+@opindex Wno-write-strings
 When compiling C, give string constants the type @code{const
 char[@var{length}]} so that
 copying the address of one into a non-@code{const} @code{char *}
@@ -3168,11 +3241,13 @@
 
 @item -Wclobbered
 @opindex Wclobbered
+@opindex Wno-clobbered
 Warn for variables that might be changed by @samp{longjmp} or
 @samp{vfork}.  This warning is also enabled by @option{-Wextra}.
 
 @item -Wconversion
 @opindex Wconversion
+@opindex Wno-conversion
 Warn for implicit conversions that may alter a value. This includes
 conversions between real and integer, like @code{abs (x)} when
 @code{x} is @code{double}; conversions between signed and unsigned,
@@ -3183,11 +3258,13 @@
 
 @item -Wempty-body
 @opindex Wempty-body
+@opindex Wno-empty-body
 An empty body occurs in an @samp{if} or @samp{else} statement. 
 This warning is also enabled by @option{-Wextra}.
 
 @item -Wsign-compare
 @opindex Wsign-compare
+@opindex Wno-sign-compare
 @cindex warning for comparison of signed and unsigned values
 @cindex comparison of signed and unsigned values, warning
 @cindex signed and unsigned values, comparison warning
@@ -3198,19 +3275,21 @@
 
 @item -Waggregate-return
 @opindex Waggregate-return
+@opindex Wno-aggregate-return
 Warn if any functions that return structures or unions are defined or
 called.  (In languages where you can return an array, this also elicits
 a warning.)
 
 @item -Walways-true
 @opindex Walways-true
+@opindex Wno-always-true
 Warn about comparisons which are always true such as testing if
 unsigned values are greater than or equal to zero.  This warning is
 enabled by @option{-Wall}.
 
 @item -Wno-attributes
+@opindex Wattributes
 @opindex Wno-attributes
-@opindex Wattributes
 Do not warn if an unexpected @code{__attribute__} is used, such as
 unrecognized attributes, function attributes applied to variables,
 etc.  This will not stop errors for incorrect use of supported
@@ -3218,6 +3297,7 @@
 
 @item -Wstrict-prototypes @r{(C only)}
 @opindex Wstrict-prototypes
+@opindex Wno-strict-prototypes
 Warn if a function is declared or defined without specifying the
 argument types.  (An old-style function definition is permitted without
 a warning if preceded by a declaration which specifies the argument
@@ -3225,6 +3305,7 @@
 
 @item -Wold-style-declaration @r{(C only)}
 @opindex Wold-style-declaration
+@opindex Wno-old-style-declaration
 Warn for obsolescent usages, according to the C Standard, in a
 declaration. For example, warn if storage-class specifiers like
 @code{static} are not the first things in a declaration.  This warning
@@ -3232,11 +3313,13 @@
 
 @item -Wold-style-definition @r{(C only)}
 @opindex Wold-style-definition
+@opindex Wno-old-style-definition
 Warn if an old-style function definition is used.  A warning is given
 even if there is a previous prototype.
 
 @item -Wmissing-parameter-type @r{(C only)}
 @opindex Wmissing-parameter-type
+@opindex Wno-missing-parameter-type
 A function parameter is declared without a type specifier in K&R-style
 functions:
 
@@ -3248,6 +3331,7 @@
 
 @item -Wmissing-prototypes @r{(C only)}
 @opindex Wmissing-prototypes
+@opindex Wno-missing-prototypes
 Warn if a global function is defined without a previous prototype
 declaration.  This warning is issued even if the definition itself
 provides a prototype.  The aim is to detect global functions that fail
@@ -3255,6 +3339,7 @@
 
 @item -Wmissing-declarations @r{(C and C++ only)}
 @opindex Wmissing-declarations
+@opindex Wno-missing-declarations
 Warn if a global function is defined without a previous declaration.
 Do so even if the definition itself provides a prototype.
 Use this option to detect global functions that are not declared in
@@ -3263,6 +3348,7 @@
 
 @item -Wmissing-field-initializers
 @opindex Wmissing-field-initializers
+@opindex Wno-missing-field-initializers
 @opindex W
 @opindex Wextra
 Warn if a structure's initializer has some fields missing.  For
@@ -3287,6 +3373,7 @@
 
 @item -Wmissing-noreturn
 @opindex Wmissing-noreturn
+@opindex Wno-missing-noreturn
 Warn about functions which might be candidates for attribute @code{noreturn}.
 Note these are only possible candidates, not absolute ones.  Care should
 be taken to manually verify functions actually do not ever return before
@@ -3296,6 +3383,7 @@
 
 @item -Wmissing-format-attribute
 @opindex Wmissing-format-attribute
+@opindex Wno-missing-format-attribute
 @opindex Wformat
 Warn about function pointers which might be candidates for @code{format}
 attributes.  Note these are only possible candidates, not absolute ones.
@@ -3316,14 +3404,15 @@
 appropriate may not be detected.
 
 @item -Wno-multichar
+@opindex Wmultichar
 @opindex Wno-multichar
-@opindex Wmultichar
 Do not warn if a multicharacter constant (@samp{'FOOF'}) is used.
 Usually they indicate a typo in the user's code, as they have
 implementation-defined values, and should not be used in portable code.
 
 @item -Wnormalized=<none|id|nfc|nfkc>
 @opindex Wnormalized
+@opindex Wno-normalized
 @cindex NFC
 @cindex NFKC
 @cindex character set, input normalization
@@ -3368,6 +3457,7 @@
 unable to be fixed to display these characters distinctly.
 
 @item -Wno-deprecated-declarations
+@opindex Wdeprecated-declarations
 @opindex Wno-deprecated-declarations
 Do not warn about uses of functions (@pxref{Function Attributes}),
 variables (@pxref{Variable Attributes}), and types (@pxref{Type
@@ -3375,11 +3465,13 @@
 attribute.
 
 @item -Wno-overflow
+@opindex Woverflow
 @opindex Wno-overflow
 Do not warn about compile-time overflow in constant expressions.
 
 @item -Woverride-init
 @opindex Woverride-init
+@opindex Wno-override-init
 @opindex W
 @opindex Wextra
 Warn if an initialized field without side effects is overridden when
@@ -3392,6 +3484,7 @@
 
 @item -Wpacked
 @opindex Wpacked
+@opindex Wno-packed
 Warn if a structure is given the packed attribute, but the packed
 attribute has no effect on the layout or size of the structure.
 Such structures may be mis-aligned for little benefit.  For
@@ -3414,6 +3507,7 @@
 
 @item -Wpadded
 @opindex Wpadded
+@opindex Wno-padded
 Warn if padding is included in a structure, either to align an element
 of the structure or to align the whole structure.  Sometimes when this
 happens it is possible to rearrange the fields of the structure to
@@ -3421,15 +3515,18 @@
 
 @item -Wredundant-decls
 @opindex Wredundant-decls
+@opindex Wno-redundant-decls
 Warn if anything is declared more than once in the same scope, even in
 cases where multiple declaration is valid and changes nothing.
 
 @item -Wnested-externs @r{(C only)}
 @opindex Wnested-externs
+@opindex Wno-nested-externs
 Warn if an @code{extern} declaration is encountered within a function.
 
 @item -Wunreachable-code
 @opindex Wunreachable-code
+@opindex Wno-unreachable-code
 Warn if the compiler detects that code will never be executed.
 
 This option is intended to warn when the compiler detects that at
@@ -3452,6 +3549,7 @@
 
 @item -Winline
 @opindex Winline
+@opindex Wno-inline
 Warn if a function can not be inlined and it was declared as inline.
 Even with this option, the compiler will not warn about failures to
 inline functions declared in system headers.
@@ -3464,6 +3562,7 @@
 warnings produced by @option{-Winline} to appear or disappear.
 
 @item -Wno-invalid-offsetof @r{(C++ only)}
+@opindex Winvalid-offsetof
 @opindex Wno-invalid-offsetof
 Suppress warnings from applying the @samp{offsetof} macro to a non-POD
 type.  According to the 1998 ISO C++ standard, applying @samp{offsetof}
@@ -3479,17 +3578,20 @@
 of the C++ standard.
 
 @item -Wno-int-to-pointer-cast @r{(C only)}
+@opindex Wint-to-pointer-cast
 @opindex Wno-int-to-pointer-cast
 Suppress warnings from casts to pointer type of an integer of a
 different size.
 
 @item -Wno-pointer-to-int-cast @r{(C only)}
+@opindex Wpointer-to-int-cast
 @opindex Wno-pointer-to-int-cast
 Suppress warnings from casts from a pointer to an integer type of a
 different size.
 
 @item -Winvalid-pch
 @opindex Winvalid-pch
+@opindex Wno-invalid-pch
 Warn if a precompiled header (@pxref{Precompiled Headers}) is found in
 the search path but can't be used.
 
@@ -3517,6 +3619,7 @@
 
 @item -Wdisabled-optimization
 @opindex Wdisabled-optimization
+@opindex Wno-disabled-optimization
 Warn if a requested optimization pass is disabled.  This warning does
 not generally indicate that there is anything wrong with your code; it
 merely indicates that GCC's optimizers were unable to handle the code
@@ -3534,10 +3637,12 @@
 
 @item -Werror
 @opindex Werror
+@opindex Wno-error
 Make all warnings into errors.
 
 @item -Werror=
 @opindex Werror=
+@opindex Wno-error=
 Make the specified warning into an errors.  The specifier for a
 warning is appended, for example @option{-Werror=switch} turns the
 warnings controlled by @option{-Wswitch} into errors.  This switch
@@ -3554,11 +3659,13 @@
 
 @item -Wstack-protector
 @opindex Wstack-protector
+@opindex Wno-stack-protector
 This option is only active when @option{-fstack-protector} is active.  It
 warns about functions that will not be protected against stack smashing.
 
 @item -Wstring-literal-comparison
 @opindex Wstring-literal-comparison
+@opindex Wno-string-literal-comparison
 Warn about suspicious comparisons to string literal constants.  In C,
 direct comparisons against the memory address of a string literal, such
 as @code{if (x == "abc")}, typically indicate a programmer error, and
@@ -3568,6 +3675,7 @@
 
 @item -Woverlength-strings
 @opindex Woverlength-strings
+@opindex Wno-overlength-strings
 Warn about string constants which are longer than the ``minimum
 maximum'' length specified in the C standard.  Modern compilers
 generally allow string constants which are much longer than the

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