https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71024
Bug ID: 71024 Summary: Missing warning for contradictory attributes Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org Target Milestone: --- Observe that on void __attribute ((always_inline)) foo (void); void __attribute ((noinline)) foo (void); $ ./cc1 -quiet q.cc q.cc:2:31: warning: declaration of ‘foo’ with attribute ‘noinline’ follows declaration with attribute ‘always_inline’ [-Wattributes] void __attribute ((noinline)) foo (void); ^~~ q.cc:1:36: note: previous declaration of ‘foo’ was here void __attribute ((always_inline)) foo (void); ^~~ but cc1plus is silent. I think we need to factor out some code out of diagnose_mismatched_decls.