diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2014-08-19 22:37:49 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2014-08-19 22:37:49 +0000 |
commit | 43f9a13cee34bbf3f007469d4dd3c3a67e6d8e6d (patch) | |
tree | 75764dc68d3b47da1315519f474d62d5a2262f04 /gcc/c-family/c-opts.c | |
parent | cd0059f55fc3e14c2b24a4db084064e0da3295a8 (diff) | |
download | gcc-43f9a13cee34bbf3f007469d4dd3c3a67e6d8e6d.zip gcc-43f9a13cee34bbf3f007469d4dd3c3a67e6d8e6d.tar.gz gcc-43f9a13cee34bbf3f007469d4dd3c3a67e6d8e6d.tar.bz2 |
re PR preprocessor/60975 (-Wvariadic-macros does not print warning)
gcc/ChangeLog:
2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/60975
PR c/53063
* doc/options.texi (CPP): Document it.
* doc/invoke.texi (Wvariadic-macros): Fix documentation.
* optc-gen.awk: Handle CPP.
* opth-gen.awk: Likewise.
gcc/c-family/ChangeLog:
2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/60975
PR c/53063
* c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
* c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
(c_common_post_options): Call init_global_opts_from_cpp.
(sanitize_cpp_opts): Do not handle Wvariadic-macros here.
gcc/testsuite/ChangeLog:
2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/60975
PR c/53063
* gcc.dg/cpp/Wvariadic-1p.c: New test.
From-SVN: r214200
Diffstat (limited to 'gcc/c-family/c-opts.c')
-rw-r--r-- | gcc/c-family/c-opts.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index b0cad20..2b423e2 100644 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -794,7 +794,8 @@ c_common_handle_option (size_t scode, const char *arg, int value, default: gcc_unreachable (); } - + + cpp_handle_option_auto (&global_options, scode, cpp_opts); return result; } @@ -1030,6 +1031,7 @@ c_common_post_options (const char **pfilename) cb->file_change = cb_file_change; cb->dir_change = cb_dir_change; cpp_post_options (parse_in); + init_global_opts_from_cpp (&global_options, cpp_get_options (parse_in)); input_location = UNKNOWN_LOCATION; @@ -1310,11 +1312,6 @@ sanitize_cpp_opts (void) && (c_dialect_cxx () ? cxx_dialect == cxx98 : !flag_isoc99)); cpp_opts->cpp_warn_long_long = warn_long_long; - /* Similarly with -Wno-variadic-macros. No check for c99 here, since - this also turns off warnings about GCCs extension. */ - cpp_opts->warn_variadic_macros - = cpp_warn_variadic_macros && (pedantic || warn_traditional); - /* If we're generating preprocessor output, emit current directory if explicitly requested or if debugging information is enabled. ??? Maybe we should only do it for debugging formats that |