This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/27654] New: bogus/missed diagnostic at -Os.
- From: "pluto at agmk dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 May 2006 08:51:36 -0000
- Subject: [Bug other/27654] New: bogus/missed diagnostic at -Os.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gcc version 4.1.1 20060504
#include <string>
bool foo ( int k )
{
std::string bar; // unused object. not detected.
switch ( k )
{
default:
return false;
break; // unreachable code. not detected.
}
}
$ i486-gnu-linux-g++ bug1.cpp -c -Wall -Os
bug1.cpp: In function 'bool foo(int)':
bug1.cpp:11: warning: control reaches end of non-void function
--
Summary: bogus/missed diagnostic at -Os.
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pluto at agmk dot net
GCC build triplet: i486-linux
GCC host triplet: i486-linux
GCC target triplet: i486-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27654