Bug 12504 - [REGRESSION] incorrect warning of missing return statement
Summary: [REGRESSION] incorrect warning of missing return statement
Status: RESOLVED DUPLICATE of bug 11725
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.4.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-03 19:34 UTC by merkert
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build: g++ (GCC) 3.4 20031001 (experimental)
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description merkert 2003-10-03 19:34:37 UTC
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.
Comment 1 Andrew Pinski 2003-10-03 20:27:19 UTC
This is a dup of bug 11725.

*** This bug has been marked as a duplicate of 11725 ***