[Bug c/53633] New: __attribute__((naked)) should disable -Wreturn-type
Bernhard.Rosenkranzer at linaro dot org
gcc-bugzilla@gcc.gnu.org
Mon Jun 11 11:53:00 GMT 2012
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: unassigned@gcc.gnu.org
ReportedBy: Bernhard.Rosenkranzer@linaro.org
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.
More information about the Gcc-bugs
mailing list