diff options
author | Dominik Vogt <vogt@linux.vnet.ibm.com> | 2015-10-14 06:53:54 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@gcc.gnu.org> | 2015-10-14 06:53:54 +0000 |
commit | 1aa5ba4e22db332e1ec0f6b018a3eb6163f707ba (patch) | |
tree | 13ca802a9cf640fd496de161f422bdfe8149308a /gcc/targhooks.c | |
parent | 168d732e0c6854ed0a9860bf25e1e68321a210e6 (diff) | |
download | gcc-1aa5ba4e22db332e1ec0f6b018a3eb6163f707ba.zip gcc-1aa5ba4e22db332e1ec0f6b018a3eb6163f707ba.tar.gz gcc-1aa5ba4e22db332e1ec0f6b018a3eb6163f707ba.tar.bz2 |
Fix "#pragma GCC pop_options"
gcc/ChangeLog
* targhooks.c (default_target_option_pragma_parse): Do not warn if
called on behalf of "#pragma GCC pop_options".
gcc/testsuite/ChangeLog
* gcc.dg/pragma-pop_options-1.c: New test.
From-SVN: r228794
Diffstat (limited to 'gcc/targhooks.c')
-rw-r--r-- | gcc/targhooks.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/targhooks.c b/gcc/targhooks.c index 7238c8f..5077ec9 100644 --- a/gcc/targhooks.c +++ b/gcc/targhooks.c @@ -1305,8 +1305,12 @@ bool default_target_option_pragma_parse (tree ARG_UNUSED (args), tree ARG_UNUSED (pop_target)) { - warning (OPT_Wpragmas, - "#pragma GCC target is not supported for this machine"); + /* If args is NULL the caller is handle_pragma_pop_options (). In that case, + emit no warning because "#pragma GCC pop_target" is valid on targets that + do not have the "target" pragma. */ + if (args) + warning (OPT_Wpragmas, + "#pragma GCC target is not supported for this machine"); return false; } |