[Bug c++/20681] [4.4/4.5/4.6/4.7 Regression] wrong "control reaches" warning with switches
dimhen at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Nov 15 14:20:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20681
--- Comment #31 from Dmitry G. Dyachenko <dimhen at gmail dot com> 2011-11-15 14:10:33 UTC ---
gcc -Wreturn-type -c r.c
r.c: In function 'bar':
r.c:8:1: warning: control reaches end of non-void function [-Wreturn-type]
enum foo { e_1 };
int bar(enum foo x)
{
switch(x) {
case e_1:
return 0;
}
}
gcc version 4.7.0 20111115 (experimental) [trunk revision 181378] (GCC)
More information about the Gcc-bugs
mailing list