[Bug c++/31783] New: [4.1.2, 4.1.1] bogus "control reaches end of non-void function" warning
wad at infinet dot ru
gcc-bugzilla@gcc.gnu.org
Wed May 2 03:01:00 GMT 2007
gcc 4.1.2 and gcc 4.1.1 shows the following bogus warning message.
[wad@hius ~/tests] arm-rtems-gcc -Os -Wall -S test.cpp
test.cpp: In member function 'int attr::create(int)':
test.cpp:17: warning: control reaches end of non-void function
the minimal testcase:
class attr
{
attr() {}
~attr() {}
int create(int);
};
int attr::create(int c)
{
attr p;
switch(c)
{
default:
return 123;
break;
}
}
--
Summary: [4.1.2, 4.1.1] bogus "control reaches end of non-void
function" warning
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: wad at infinet dot ru
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31783
More information about the Gcc-bugs
mailing list