[Bug c++/11775] New: "Control reaches end" warning issued for __attribute__((naked)) functions
pgonzalez at bluel dot com
gcc-bugzilla@gcc.gnu.org
Sun Aug 3 01:24:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11775
Summary: "Control reaches end" warning issued for
__attribute__((naked)) functions
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pgonzalez at bluel dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: arm-arm-elf
If I run "g++ test.cpp -c -Wall" on the attached source code,
the following warning is reported:
test.cpp: In function `int test()':
test.cpp:5: warning: control reaches end of non-void function
This does not make sense, and there is no way to selectively
disable the warning. GCC 3.3.1 has the same behavior.
___________
__attribute__((naked))
int test() {
asm("mov r0, #1"); // custom assembly
}
More information about the Gcc-bugs
mailing list