aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2009-09-28 21:23:35 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2009-09-28 21:23:35 +0000
commit13ebf17b66c3ff8f4291f046158347191fe396c1 (patch)
treecf4d27dc41d9d27b7f6b3b19622143ef67c50685 /gcc
parent2bc98066036afd3da5b7846c21f997cef4de52b9 (diff)
downloadgcc-13ebf17b66c3ff8f4291f046158347191fe396c1.zip
gcc-13ebf17b66c3ff8f4291f046158347191fe396c1.tar.gz
gcc-13ebf17b66c3ff8f4291f046158347191fe396c1.tar.bz2
re PR middle-end/40500 (Revision 148512 failed to build binutils)
PR middle-end/40500 * c-opts.c (c_common_handle_option): Don't set warn_jump_misses_init for -Wall. * doc/invoke.texi (Warning Options): Update documentation. From-SVN: r152252
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/c-opts.c4
-rw-r--r--gcc/doc/invoke.texi27
3 files changed, 21 insertions, 17 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3470f8a..2a84e34 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2009-09-28 Ian Lance Taylor <iant@google.com>
+
+ PR middle-end/40500
+ * c-opts.c (c_common_handle_option): Don't set
+ warn_jump_misses_init for -Wall.
+ * doc/invoke.texi (Warning Options): Update documentation.
+
2009-09-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.in ($(out_object_file)): Depend on
diff --git a/gcc/c-opts.c b/gcc/c-opts.c
index d9165aa..e026fd9 100644
--- a/gcc/c-opts.c
+++ b/gcc/c-opts.c
@@ -397,8 +397,6 @@ c_common_handle_option (size_t scode, const char *arg, int value)
warn_strict_overflow = value;
warn_array_bounds = value;
warn_volatile_register_var = value;
- if (warn_jump_misses_init == -1)
- warn_jump_misses_init = value;
/* Only warn about unknown pragmas that are not in system
headers. */
@@ -450,7 +448,7 @@ c_common_handle_option (size_t scode, const char *arg, int value)
if (warn_enum_compare == -1 && value)
warn_enum_compare = value;
/* Because C++ always warns about a goto which misses an
- initialization, -Wc++-compat turns on -Wgoto-misses-init. */
+ initialization, -Wc++-compat turns on -Wjump-misses-init. */
if (warn_jump_misses_init == -1 && value)
warn_jump_misses_init = value;
cpp_opts->warn_cxx_operator_names = value;
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 92652cc..4ae8a02 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -3025,20 +3025,6 @@ requiring a non-null value by the @code{nonnull} function attribute.
@option{-Wnonnull} is included in @option{-Wall} and @option{-Wformat}. It
can be disabled with the @option{-Wno-nonnull} option.
-@item -Wjump-misses-init @r{(C, Objective-C only)}
-@opindex Wjump-misses-init
-@opindex Wno-jump-misses-init
-Warn if a @code{goto} statement or a @code{switch} statement jumps
-forward across the initialization of a variable, or jumps backward to a
-label after the variable has been initialized. This only warns about
-variables which are initialized when they are declared. This warning is
-only supported for C and Objective C; in C++ this sort of branch is an
-error in any case.
-
-@option{-Wjump-misses-init} is included in @option{-Wall} and
-@option{-Wc++-compat}. It can be disabled with the
-@option{-Wno-jump-misses-init} option.
-
@item -Winit-self @r{(C, C++, Objective-C and Objective-C++ only)}
@opindex Winit-self
@opindex Wno-init-self
@@ -3850,6 +3836,19 @@ Warn about a comparison between values of different enum types. In C++
this warning is enabled by default. In C this warning is enabled by
@option{-Wall}.
+@item -Wjump-misses-init @r{(C, Objective-C only)}
+@opindex Wjump-misses-init
+@opindex Wno-jump-misses-init
+Warn if a @code{goto} statement or a @code{switch} statement jumps
+forward across the initialization of a variable, or jumps backward to a
+label after the variable has been initialized. This only warns about
+variables which are initialized when they are declared. This warning is
+only supported for C and Objective C; in C++ this sort of branch is an
+error in any case.
+
+@option{-Wjump-misses-init} is included in @option{-Wc++-compat}. It
+can be disabled with the @option{-Wno-jump-misses-init} option.
+
@item -Wsign-compare
@opindex Wsign-compare
@opindex Wno-sign-compare