summaryrefslogtreecommitdiffstats
path: root/gcc/doc
diff options
context:
space:
mode:
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2002-03-05 02:34:07 +0000
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2002-03-05 02:34:07 +0000
commita39bc6f7e110e4c6b6603c3c1b10c0dcdd4336fe (patch)
tree6806586cc8e5784a42c5d33e4ef34100e6e7b370 /gcc/doc
parentae484cc8d2362f1f2f8f589e6c95bc871aa568b4 (diff)
downloadppe42-gcc-a39bc6f7e110e4c6b6603c3c1b10c0dcdd4336fe.tar.gz
ppe42-gcc-a39bc6f7e110e4c6b6603c3c1b10c0dcdd4336fe.zip
* toplev.c (documented_lang_options): Document more
language-specific options. * doc/invoke.texi (Warning Options): Correct documentation for -Wno-multichar, -Wno-div-by-zero, and -Wsystem-headers. * c-decl.c (c_decode_option): Use a table to handle warning options. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50299 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi60
1 files changed, 29 insertions, 31 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index e3bca52fd13..a6d37e28274 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -214,7 +214,7 @@ in the following sections.
-w -W -Wall -Waggregate-return @gol
-Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment @gol
-Wconversion -Wno-deprecated-declarations @gol
--Wdisabled-optimization -Wdiv-by-zero -Werror @gol
+-Wdisabled-optimization -Wno-div-by-zero -Werror @gol
-Wfloat-equal -Wformat -Wformat=2 @gol
-Wformat-nonliteral -Wformat-security @gol
-Wimplicit -Wimplicit-int @gol
@@ -224,7 +224,7 @@ in the following sections.
-Wlarger-than-@var{len} -Wlong-long @gol
-Wmain -Wmissing-braces -Wmissing-declarations @gol
-Wmissing-format-attribute -Wmissing-noreturn @gol
--Wmultichar -Wno-format-extra-args -Wno-format-y2k @gol
+-Wno-multichar -Wno-format-extra-args -Wno-format-y2k @gol
-Wno-import -Wpacked -Wpadded @gol
-Wparentheses -Wpointer-arith -Wredundant-decls @gol
-Wreturn-type -Wsequence-point -Wshadow @gol
@@ -2172,35 +2172,6 @@ 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
conjunction with macros.
-
-@item -Wdiv-by-zero
-@opindex Wno-div-by-zero
-@opindex Wdiv-by-zero
-Warn about compile-time integer division by zero. This is default. To
-inhibit the warning messages, use @option{-Wno-div-by-zero}. Floating
-point division by zero is not warned about, as it can be a legitimate
-way of obtaining infinities and NaNs.
-
-@item -Wmultichar
-@opindex Wno-multichar
-@opindex Wmultichar
-Warn if a multicharacter constant (@samp{'FOOF'}) is used. This is
-default. To inhibit the warning messages, use @option{-Wno-multichar}.
-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 -Wsystem-headers
-@opindex Wsystem-headers
-@cindex warnings from system headers
-@cindex system headers, warnings from
-Print warning messages for constructs found in system header files.
-Warnings from system headers are normally suppressed, on the assumption
-that they usually do not indicate real problems and would only make the
-compiler output harder to read. Using this command line option tells
-GCC to emit warnings from system headers as if they occurred in user
-code. However, note that using @option{-Wall} in conjunction with this
-option will @emph{not} warn about unknown pragmas in system
-headers---for that, @option{-Wunknown-pragmas} must also be used.
@end table
The following @option{-W@dots{}} options are not implied by @option{-Wall}.
@@ -2289,6 +2260,26 @@ struct s x = @{ 3, 4 @};
@end smallexample
@end itemize
+@item -Wno-div-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
+@cindex warnings from system headers
+@cindex system headers, warnings from
+Print warning messages for constructs found in system header files.
+Warnings from system headers are normally suppressed, on the assumption
+that they usually do not indicate real problems and would only make the
+compiler output harder to read. Using this command line option tells
+GCC to emit warnings from system headers as if they occurred in user
+code. However, note that using @option{-Wall} in conjunction with this
+option will @emph{not} warn about unknown pragmas in system
+headers---for that, @option{-Wunknown-pragmas} must also be used.
+
@item -Wfloat-equal
@opindex Wfloat-equal
Warn if floating point values are used in equality comparisons.
@@ -2505,6 +2496,13 @@ case, and some functions for which @code{format} attributes are
appropriate may not be detected. This option has no effect unless
@option{-Wformat} is enabled (possibly by @option{-Wall}).
+@item -Wno-multichar
+@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 -Wno-deprecated-declarations
@opindex Wno-deprecated-declarations
Do not warn about uses of functions, variables, and types marked as
OpenPOWER on IntegriCloud