http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53633
Bug #: 53633
Summary: __attribute__((naked)) should disable -Wreturn-type
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: [email protected]
ReportedBy: [email protected]
This code:
__attribute__((naked))
int test() {
asm("mov r0, #1");
}
triggers a "control reaches end of non-void function" warning (or error, if
-Werror is used).
IMO this warning should be omitted, given __attribute__((naked)) is meant to
tell the compiler that asm code inside takes care of everything.