This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11939] New: Incorrect warning regression for template class with -Wall option.
- From: "raimond_merkert at raytheon dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Aug 2003 01:31:59 -0000
- Subject: [Bug c++/11939] New: Incorrect warning regression for template class with -Wall option.
- 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=11939
Summary: Incorrect warning regression for template class with -
Wall option.
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: raimond_merkert at raytheon dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC 3.4 generates a warning when I think it should not. This is different from
3.3.1.
The warning is:
test.cpp: In member function `virtual int X<T>::foo()':
test.cpp:10: warning: no return statement in function returning non-void
for this program:
cat >> test.cpp <<EOF
template <class T>
struct X
{
virtual int foo() throw (double)
{ throw 1.0; }
};
EOF
gcc -c -Wall test.cpp
This error only happens if X is a template class. The GCC 3.4 build is
gcc-3.4-20030813.