Commit 1aa5ba4e by Dominik Vogt Committed by Andreas Krebbel

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
parent 168d732e
2015-10-14 Dominik Vogt <vogt@linux.vnet.ibm.com>
* targhooks.c (default_target_option_pragma_parse): Do not warn if
called on behalf of "#pragma GCC pop_options".
2015-10-14 Tom de Vries <tom@codesourcery.com> 2015-10-14 Tom de Vries <tom@codesourcery.com>
* cfganal.c (verify_no_unreachable_blocks): New function. * cfganal.c (verify_no_unreachable_blocks): New function.
...@@ -1305,8 +1305,12 @@ bool ...@@ -1305,8 +1305,12 @@ bool
default_target_option_pragma_parse (tree ARG_UNUSED (args), default_target_option_pragma_parse (tree ARG_UNUSED (args),
tree ARG_UNUSED (pop_target)) tree ARG_UNUSED (pop_target))
{ {
warning (OPT_Wpragmas, /* If args is NULL the caller is handle_pragma_pop_options (). In that case,
"#pragma GCC target is not supported for this machine"); 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; return false;
} }
......
2015-10-14 Dominik Vogt <vogt@linux.vnet.ibm.com>
* gcc.dg/pragma-pop_options-1.c: New test.
2015-10-13 Jakub Jelinek <jakub@redhat.com> 2015-10-13 Jakub Jelinek <jakub@redhat.com>
Aldy Hernandez <aldyh@redhat.com> Aldy Hernandez <aldyh@redhat.com>
......
/* Check warnings produced by #pragma GCC push/pop/reset_options. */
/* { dg-do assemble } */
#pragma push_options
#pragma pop_options
int foo;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment