This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12504] New: [REGRESSION] incorrect warning of missing return statement
- From: "merkert at charter dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Oct 2003 19:34:38 -0000
- Subject: [Bug c++/12504] New: [REGRESSION] incorrect warning of missing return statement
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12504
Summary: [REGRESSION] incorrect warning of missing return
statement
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: merkert at charter dot net
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: g++ (GCC) 3.4 20031001 (experimental)
The following code prints a warning:
cat > test.cpp <<EOF
template <class T> int foo()
{ throw 0; }
EOF
g++ -c -Wall test.cpp
test.cpp: In function `int foo()':
test.cpp:2: warning: no return statement in function returning non-void
This code compiles fine with gcc-3.3.1, so it's a regression.