typedef enum { foo, bar } e;
int zoo( e __e )
{
        switch ( __e )
        {
                case foo: return -1;
                case bar: return +1;
        }
}

bug.cpp: In function 'int zoo(e)':
bug.cpp:9: warning: control reaches end of non-void function


-- 
           Summary: wrong "control reaches" warning with enums.
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pluto at agmk dot net
 GCC build triplet: x86-64-linux
  GCC host triplet: x86-64-linux
GCC target triplet: x86-64-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28236

Reply via email to