-Wvariadic-macros -Wvla @gol
-Wvolatile-register-var -Wwrite-strings}
-@item C-only Warning Options
+@item C and Objective-C-only Warning Options
@gccoptlist{-Wbad-function-cast -Wmissing-declarations @gol
-Wmissing-parameter-type -Wmissing-prototypes -Wnested-externs @gol
-Wold-style-declaration -Wold-style-definition @gol
functions will have linkage like inline functions; they just won't be
inlined by default.
-@item -Wabi @r{(C++ only)}
+@item -Wabi @r{(C++ and Objective-C++ only)}
@opindex Wabi
@opindex Wno-abi
Warn when G++ generates code that is probably not compatible with the
@end itemize
-@item -Wctor-dtor-privacy @r{(C++ only)}
+@item -Wctor-dtor-privacy @r{(C++ and Objective-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)}
+@item -Wnon-virtual-dtor @r{(C++ and Objective-C++ only)}
@opindex Wnon-virtual-dtor
@opindex Wno-non-virtual-dtor
Warn when a class has virtual functions and accessible non-virtual
an instance of a derived class through a pointer to the base class.
This warning is also enabled if -Weffc++ is specified.
-@item -Wreorder @r{(C++ only)}
+@item -Wreorder @r{(C++ and Objective-C++ only)}
@opindex Wreorder
@opindex Wno-reorder
@cindex reordering, warning
The following @option{-W@dots{}} options are not affected by @option{-Wall}.
@table @gcctabopt
-@item -Weffc++ @r{(C++ only)}
+@item -Weffc++ @r{(C++ and Objective-C++ only)}
@opindex Weffc++
@opindex Wno-effc++
Warn about violations of the following style guidelines from Scott Meyers'
headers do not obey all of these guidelines; use @samp{grep -v}
to filter out those warnings.
-@item -Wno-deprecated @r{(C++ only)}
+@item -Wno-deprecated @r{(C++ and Objective-C++ only)}
@opindex Wno-deprecated
@opindex Wdeprecated
Do not warn about usage of deprecated features. @xref{Deprecated Features}.
-@item -Wstrict-null-sentinel @r{(C++ only)}
+@item -Wstrict-null-sentinel @r{(C++ and Objective-C++ only)}
@opindex Wstrict-null-sentinel
@opindex Wno-strict-null-sentinel
Warn also about the use of an uncasted @code{NULL} as sentinel. When
it is guaranteed to of the same size as a pointer. But this use is
not portable across different compilers.
-@item -Wno-non-template-friend @r{(C++ only)}
+@item -Wno-non-template-friend @r{(C++ and Objective-C++ only)}
@opindex Wno-non-template-friend
@opindex Wnon-template-friend
Disable warnings when non-templatized friend functions are declared
@option{-Wno-non-template-friend} which keeps the conformant compiler code
but disables the helpful warning.
-@item -Wold-style-cast @r{(C++ only)}
+@item -Wold-style-cast @r{(C++ and Objective-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
@samp{static_cast}, @samp{reinterpret_cast}, and @samp{const_cast}) are
less vulnerable to unintended effects and much easier to search for.
-@item -Woverloaded-virtual @r{(C++ only)}
+@item -Woverloaded-virtual @r{(C++ and Objective-C++ only)}
@opindex Woverloaded-virtual
@opindex Wno-overloaded-virtual
@cindex overloaded virtual fn, warning
will fail to compile.
-@item -Wno-pmf-conversions @r{(C++ only)}
+@item -Wno-pmf-conversions @r{(C++ and Objective-C++ only)}
@opindex Wno-pmf-conversions
@opindex Wpmf-conversions
Disable the diagnostic for converting a bound pointer to member function
to a plain pointer.
-@item -Wsign-promo @r{(C++ only)}
+@item -Wsign-promo @r{(C++ and Objective-C++ only)}
@opindex Wsign-promo
@opindex Wno-sign-promo
Warn when overload resolution chooses a promotion from unsigned or
Dump interface declarations for all classes seen in the source file to a
file named @file{@var{sourcename}.decl}.
-@item -Wassign-intercept
+@item -Wassign-intercept @r{(Objective-C and Objective-C++ only)}
@opindex Wassign-intercept
@opindex Wno-assign-intercept
Warn whenever an Objective-C assignment is being intercepted by the
garbage collector.
-@item -Wno-protocol
+@item -Wno-protocol @r{(Objective-C and Objective-C++ only)}
@opindex Wno-protocol
@opindex Wprotocol
If a class is declared to implement a protocol, a warning is issued for
methods inherited from the superclass are considered to be implemented,
and no warning is issued for them.
-@item -Wselector
+@item -Wselector @r{(Objective-C and Objective-C++ only)}
@opindex Wselector
@opindex Wno-selector
Warn if multiple methods of different types for the same selector are
found during compilation, or because the @option{-fsyntax-only} option is
being used.
-@item -Wstrict-selector-match
+@item -Wstrict-selector-match @r{(Objective-C and Objective-C++ only)}
@opindex Wstrict-selector-match
@opindex Wno-strict-selector-match
Warn if multiple methods with differing argument and/or return types are
if any differences found are confined to types which share the same size
and alignment.
-@item -Wundeclared-selector
+@item -Wundeclared-selector @r{(Objective-C and Objective-C++ only)}
@opindex Wundeclared-selector
@opindex Wno-undeclared-selector
Warn if a @code{@@selector(@dots{})} expression referring to an
warning if the unused arguments are all pointers, since the Single
Unix Specification says that such unused arguments are allowed.
-@item -Wno-format-zero-length
+@item -Wno-format-zero-length @r{(C and Objective-C only)}
@opindex Wno-format-zero-length
@opindex Wformat-zero-length
If @option{-Wformat} is specified, do not warn about zero-length formats.
@option{-Wformat}. Currently equivalent to @samp{-Wformat
-Wformat-nonliteral -Wformat-security -Wformat-y2k}.
-@item -Wnonnull
+@item -Wnonnull @r{(C and Objective-C only)}
@opindex Wnonnull
@opindex Wno-nonnull
Warn about passing a null pointer for arguments marked as
@end group
@end smallexample
-@item -Wimplicit-int
+@item -Wimplicit-int @r{(C and Objective-C only)}
@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
+@item -Wimplicit-function-declaration @r{(C and Objective-C only)}
@opindex Wimplicit-function-declaration
@opindex Wno-implicit-function-declaration
Give a warning whenever a function is used before being declared. In
Same as @option{-Wimplicit-int} and @option{-Wimplicit-function-declaration}.
This warning is enabled by @option{-Wall}.
-@item -Wignored-qualifiers
+@item -Wignored-qualifiers @r{(C and C++ only)}
@opindex Wignored-qualifiers
@opindex Wno-ignored-qualifiers
Warn if the return type of a function has a type qualifier
this is done with the relational operators, so equality comparisons are
probably mistaken.
-@item -Wtraditional @r{(C only)}
+@item -Wtraditional @r{(C and Objective-C only)}
@opindex Wtraditional
@opindex Wno-traditional
Warn about certain constructs that behave differently in traditional and
traditional C compatibility.
@end itemize
-@item -Wtraditional-conversion @r{(C only)}
+@item -Wtraditional-conversion @r{(C and Objective-C only)}
@opindex Wtraditional-conversion
@opindex Wno-traditional-conversion
Warn if a prototype causes a type conversion that is different from what
conversions changing the width or signedness of a fixed point argument
except when the same as the default promotion.
-@item -Wdeclaration-after-statement @r{(C only)}
+@item -Wdeclaration-after-statement @r{(C and Objective-C only)}
@opindex Wdeclaration-after-statement
@opindex Wno-declaration-after-statement
Warn when a declaration is found after a statement in a block. This
@samp{<} or @samp{>=}. This warning is also enabled by
@option{-Wextra}.
-@item -Wbad-function-cast @r{(C only)}
+@item -Wbad-function-cast @r{(C and Objective-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
+@item -Wc++-compat @r{(C and Objective-C only)}
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.
etc. This will not stop errors for incorrect use of supported
attributes.
-@item -Wstrict-prototypes @r{(C only)}
+@item -Wstrict-prototypes @r{(C and Objective-C only)}
@opindex Wstrict-prototypes
@opindex Wno-strict-prototypes
Warn if a function is declared or defined without specifying the
a warning if preceded by a declaration which specifies the argument
types.)
-@item -Wold-style-declaration @r{(C only)}
+@item -Wold-style-declaration @r{(C and Objective-C only)}
@opindex Wold-style-declaration
@opindex Wno-old-style-declaration
Warn for obsolescent usages, according to the C Standard, in a
@code{static} are not the first things in a declaration. This warning
is also enabled by @option{-Wextra}.
-@item -Wold-style-definition @r{(C only)}
+@item -Wold-style-definition @r{(C and Objective-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)}
+@item -Wmissing-parameter-type @r{(C and Objective-C only)}
@opindex Wmissing-parameter-type
@opindex Wno-missing-parameter-type
A function parameter is declared without a type specifier in K&R-style
This warning is also enabled by @option{-Wextra}.
-@item -Wmissing-prototypes @r{(C only)}
+@item -Wmissing-prototypes @r{(C and Objective-C only)}
@opindex Wmissing-prototypes
@opindex Wno-missing-prototypes
Warn if a global function is defined without a previous prototype
provides a prototype. The aim is to detect global functions that fail
to be declared in header files.
-@item -Wmissing-declarations @r{(C and C++ only)}
+@item -Wmissing-declarations
@opindex Wmissing-declarations
@opindex Wno-missing-declarations
Warn if a global function is defined without a previous declaration.
@opindex Woverflow
Do not warn about compile-time overflow in constant expressions.
-@item -Woverride-init
+@item -Woverride-init @r{(C and Objective-C only)}
@opindex Woverride-init
@opindex Wno-override-init
@opindex W
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)}
+@item -Wnested-externs @r{(C and Objective-C only)}
@opindex Wnested-externs
@opindex Wno-nested-externs
Warn if an @code{extern} declaration is encountered within a function.
seemingly insignificant changes in the source program can cause the
warnings produced by @option{-Winline} to appear or disappear.
-@item -Wno-invalid-offsetof @r{(C++ only)}
+@item -Wno-invalid-offsetof @r{(C++ and Objective-C++ only)}
@opindex Wno-invalid-offsetof
@opindex Winvalid-offsetof
Suppress warnings from applying the @samp{offsetof} macro to a non-POD
The restrictions on @samp{offsetof} may be relaxed in a future version
of the C++ standard.
-@item -Wno-int-to-pointer-cast @r{(C only)}
+@item -Wno-int-to-pointer-cast @r{(C and Objective-C only)}
@opindex Wno-int-to-pointer-cast
@opindex Wint-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)}
+@item -Wno-pointer-to-int-cast @r{(C and Objective-C only)}
@opindex Wno-pointer-to-int-cast
@opindex Wpointer-to-int-cast
Suppress warnings from casts from a pointer to an integer type of a
complex; GCC will refuse to optimize programs when the optimization
itself is likely to take inordinate amounts of time.
-@item -Wpointer-sign
+@item -Wpointer-sign @r{(C and Objective-C only)}
@opindex Wpointer-sign
@opindex Wno-pointer-sign
Warn for pointer argument passing or assignment with different signedness.