This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/27654] New: bogus/missed diagnostic at -Os.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]