From: Richard Guenther Date: Tue, 10 Jan 2012 16:27:55 +0000 (+0000) Subject: re PR lto/51806 (-flto ignores -Werror) X-Git-Tag: releases/gcc-4.7.0~1063 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aee1522197074239bfe9629b009015ac1c595810;p=thirdparty%2Fgcc.git re PR lto/51806 (-flto ignores -Werror) 2012-01-10 Richard Guenther 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 22535bd2223b..cfd0a864e0b4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-01-10 Richard Guenther + + PR middle-end/51806 + * opts.c (common_handle_option): Handle -Werror. + 2012-01-10 Andreas Schwab * config/m68k/sync.md ("atomic_compare_and_swap_1"): Fix diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 95ce166a2043..10a9ddd86eae 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,9 @@ +2012-01-10 Richard Guenther + + PR middle-end/51806 + * c-opts.c (c_common_handle_option): Move -Werror handling + to language independent code. + 2012-01-05 Richard Guenther PR middle-end/51764 diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index 3a4d8a87f62d..4f0d8861470b 100644 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -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; diff --git a/gcc/opts.c b/gcc/opts.c index 2ed556030eb2..6532b56d7528 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -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;