https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86620
Bug ID: 86620 Summary: __attribute__((no inline)) gives incorrect warning with overloaded functions Product: gcc Version: 8.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: shoup at cs dot nyu.edu Target Milestone: --- Input file GGG.cpp: struct X; void h(X&,X&); inline void h(X&,int) {} __attribute__((noinline)) void h(X&,X&) {} Command line: g++ -c GGG.cpp Output: GGG.cpp:4:32: warning: declaration of 'void h(X&, X&)' with attribute 'noinline' follows inline declaration [-Wattributes] __attribute__((noinline)) void h(X&,X&) {} ^ GGG.cpp:3:13: note: previous definition of 'void h(X&, int)' was here inline void h(X&,int) {} Commentary: This warning seems incorrect. Previous versions of GCC do not emit this warning, even with -Wall -Wextra.