diff options
author | Jakub Jelinek <jakub@redhat.com> | 2014-01-18 11:18:33 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2014-01-18 11:18:33 +0100 |
commit | fa5d6c752e9b9bf26be73a5da4e68ff243f0ac32 (patch) | |
tree | 1bad4adf41de31070d1b4764e799d69e1deff463 /gcc/config | |
parent | 04da56800d7dab3b3aee10b742328efc49ff3a4a (diff) | |
download | gcc-fa5d6c752e9b9bf26be73a5da4e68ff243f0ac32.zip gcc-fa5d6c752e9b9bf26be73a5da4e68ff243f0ac32.tar.gz gcc-fa5d6c752e9b9bf26be73a5da4e68ff243f0ac32.tar.bz2 |
re PR target/58944 (bogus -Wunused-macros warnings when compiling Libreoffice)
PR target/58944
* config/i386/i386-c.c (ix86_pragma_target_parse): Temporarily
clear cpp_get_options (parse_in)->warn_unused_macros for
ix86_target_macros_internal with cpp_define.
* gcc.target/i386/pr58944.c: Drop -march=native from dg-options.
Remove dg-prune-output lines.
From-SVN: r206750
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/i386/i386-c.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/config/i386/i386-c.c b/gcc/config/i386/i386-c.c index ce9ba95..ee83de6 100644 --- a/gcc/config/i386/i386-c.c +++ b/gcc/config/i386/i386-c.c @@ -460,6 +460,13 @@ ix86_pragma_target_parse (tree args, tree pop_target) (enum fpmath_unit) prev_opt->x_ix86_fpmath, cpp_undef); + /* For the definitions, ensure all newly defined macros are considered + as used for -Wunused-macros. There is no point warning about the + compiler predefined macros. */ + cpp_options *cpp_opts = cpp_get_options (parse_in); + unsigned char saved_warn_unused_macros = cpp_opts->warn_unused_macros; + cpp_opts->warn_unused_macros = 0; + /* Define all of the macros for new options that were just turned on. */ ix86_target_macros_internal (cur_isa & diff_isa, cur_arch, @@ -467,6 +474,8 @@ ix86_pragma_target_parse (tree args, tree pop_target) (enum fpmath_unit) cur_opt->x_ix86_fpmath, cpp_define); + cpp_opts->warn_unused_macros = saved_warn_unused_macros; + return true; } |