Message ID | alpine.LNX.2.00.1201101323440.4999@zhemvz.fhfr.qr |
---|---|
State | New |
Headers | show |
On Tue, 10 Jan 2012, Richard Guenther wrote: > This fixes LTO not honoring -Werror (similar for all other > non-C-family frontends), despite handling -Werror= just fine. > The issue is that the diagnostic context is only adjusted from > the c-family handle-options routine, not from the common > one (which does process -Werror= though). > > Bootstrapped and tested on x86_64-unknown-linux-gnu, ok for trunk? OK.
Index: gcc/c-family/c-opts.c =================================================================== --- gcc/c-family/c-opts.c (revision 183054) +++ gcc/c-family/c-opts.c (working copy) @@ -449,10 +449,6 @@ c_common_handle_option (size_t scode, co 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: gcc/opts.c =================================================================== --- gcc/opts.c (revision 183054) +++ gcc/opts.c (working copy) @@ -1420,6 +1420,10 @@ common_handle_option (struct gcc_options /* 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;