GCC warns for noreturn functions returning non-void, but only when declared in the obsolete way using volatile.
typedef int ft(void); volatile ft f; warns "'noreturn' function returns non-void value", but int f(void) __attribute__((noreturn)); does not. -- Summary: missing warning for noreturn function returning non-void Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jsm28 at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20000