On Tue, 25 Jul 2017, Marek Polacek wrote: > PR c/81544 complaints that we aren't detecting clashing noreturn / > warn_unused_result attributes so this patch adds that checking. Martin > plans to do more systematic checking in this area but meanwhile we > might want to go with this. > > Bootstrapped/regtested on x86_64-linux, ok for trunk?
I'd expect exactly the same cases to be diagnosed for the two attributes on the same declaration, in either order, whether or not inside a single __attribute__, as are diagnosed when multiple declarations are involved (this applies to all such cases of invalid attribute combinations, not just this one). Whether or not this patch achieves this, the testcase doesn't seem to cover the case of a single declaration with both attributes (and I don't see an existing such test in c-c++-common or gcc.dg either). -- Joseph S. Myers jos...@codesourcery.com