On 10/13/2015 03:31 PM, Dominik Vogt wrote:
On Tue, Oct 13, 2015 at 02:28:37PM +0200, Bernd Schmidt wrote:
On 10/13/2015 02:02 PM, Dominik Vogt wrote:
When "#pragma GCC pop_options" is used on a platform without
support for "#pragma GCC target", Gcc emits a warning.  As
pop_options is useful on targets without the target pragma to
restore optimizations flags, the warning should be removed.

The attached patch does that rather inelegantly by checking if the
pragma_parse hook points to the default implementation.  I could't
think of a similarly terse but less clumsy way.  Suggestions for a
better test are very welcome.

Ok, I had to go look at the code to figure out what's going on. A suggestion for a possibly less clumsy way - recognize which pragma we're looking at from the arguments. Looks like ix86_pragma_target_parse has a "! args" test to determine if it has a pop, maybe the default function could do the same. If that's insufficient, pass another argument to identify clearly in what situation the hook is being parsed.


Bernd

Reply via email to