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

--- Comment #29 from Ami Fischman <ami at fischman dot org> 2011-02-23 23:35:45 
UTC ---
Further reduced test case from dup bug 47864:
$ nl t.cc ; g++ -finstrument-functions -Wreturn-type -Werror -c t.cc
     1  int foo(int type) {
     2    switch(type) {
     3      case 0: return 1; break;
     4      default: return 0;
     5    }
     6  }
cc1plus: warnings being treated as errors
t.cc: In function ‘int foo(int)’:
t.cc:6: error: control reaches end of non-void function

(in 4.4.3)

Reply via email to