$ g++ t1.cpp -Wall -c
t1.cpp: In function 'bool f()':
t1.cpp:10: warning: control reaches end of non-void function
$ g++ t2.cpp -Wall -c
t2.cpp: In function 'bool f(int)':
t2.cpp:16: warning: control reaches end of non-void function
tested on 4.1.2, 4.2.3-20080201 and 4.3.0-20080417
--
Summary: wrong "control reaches end of non-void function" warning
Product: gcc
Version: 4.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pluto at agmk dot net
GCC host triplet: x86_64-gnu-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36254