re PR lto/51806 (-flto ignores -Werror)
authorRichard Guenther <rguenther@suse.de>
Tue, 10 Jan 2012 16:27:55 +0000 (16:27 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 10 Jan 2012 16:27:55 +0000 (16:27 +0000)
2012-01-10  Richard Guenther  <rguenther@suse.de>

PR middle-end/51806
c-family/
* c-opts.c (c_common_handle_option): Move -Werror handling
to language independent code.

* opts.c (common_handle_option): Handle -Werror.

From-SVN: r183069

gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-opts.c
gcc/opts.c

index 22535bd2223bb368b43ae69f528d1649fe0cb720..cfd0a864e0b4d2a54140407cef75d616c6011423 100644 (file)
@@ -1,3 +1,8 @@
+2012-01-10  Richard Guenther  <rguenther@suse.de>
+
+       PR middle-end/51806
+       * opts.c (common_handle_option): Handle -Werror.
+
 2012-01-10  Andreas Schwab  <schwab@linux-m68k.org>
 
        * config/m68k/sync.md ("atomic_compare_and_swap<mode>_1"): Fix
index 95ce166a2043dadb7bcfc6e8b99e37f3671f097b..10a9ddd86eaeb05369ad1d40e356642a2fa8ddea 100644 (file)
@@ -1,3 +1,9 @@
+2012-01-10  Richard Guenther  <rguenther@suse.de>
+
+       PR middle-end/51806
+       * c-opts.c (c_common_handle_option): Move -Werror handling
+       to language independent code.
+
 2012-01-05  Richard Guenther  <rguenther@suse.de>
 
        PR middle-end/51764
index 3a4d8a87f62d17313cf1da8bb65c5f48586e3a36..4f0d8861470b2ea243b2f498cdaf54ea71180c3d 100644 (file)
@@ -449,10 +449,6 @@ c_common_handle_option (size_t scode, const char *arg, int value,
       cpp_opts->warn_endif_labels = value;
       break;
 
-    case OPT_Werror:
-      global_dc->warning_as_error_requested = value;
-      break;
-
     case OPT_Wformat:
       set_Wformat (value);
       break;
index 2ed556030eb26f4fffca3324f9e2d97ed1898cb0..6532b56d75289991c36d69b0f29243f2e2d0fc42 100644 (file)
@@ -1420,6 +1420,10 @@ common_handle_option (struct gcc_options *opts,
       /* Currently handled in a prescan.  */
       break;
 
+    case OPT_Werror:
+      dc->warning_as_error_requested = value;
+      break;
+
     case OPT_Werror_:
       if (lang_mask == CL_DRIVER)
        break;