This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11775] New: "Control reaches end" warning issued for __attribute__((naked)) functions
- From: "pgonzalez at bluel dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Aug 2003 01:24:25 -0000
- Subject: [Bug c++/11775] New: "Control reaches end" warning issued for __attribute__((naked)) functions
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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
}