[Bug c++/11939] New: Incorrect warning regression for template class with -Wall option.
raimond_merkert at raytheon dot com
gcc-bugzilla@gcc.gnu.org
Sat Aug 16 01:31:00 GMT 2003
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.
More information about the Gcc-bugs
mailing list