On Mon, 9 May 2016, Marek Polacek wrote: > In this PR, Richi pointed out that we don't warn for the case when a > declaration with attribute optimize follows the definition which is lacking > that attribute. This patch adds such a warning. Though the question is > whether this shouldn't apply to more attributes than just "optimize". And, > as can be seen in the testcase, we'll warn for even for the case when the > definition has > optimize ("no-associative-math,O2") > and the declaration > optimize ("O2,no-associative-math") > Not sure if we have something better than attribute_value_equal, though. > > (The C++ FE lacks these kind of warnings; I opened PR71024 for that.) > > Bootstrapped/regtested on x86_64-linux, ok for trunk?
OK. -- Joseph S. Myers jos...@codesourcery.com