[Bug c++/48586] New: missing no return warning in template operator
flast at flast dot jp
gcc-bugzilla@gcc.gnu.org
Wed Apr 13 07:03:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48586
Summary: missing no return warning in template operator
Product: gcc
Version: 4.4.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: flast@flast.jp
GCC missing no return warning in template operator that's return type depends
template parameter.
---- testcase.C ----
template < typename T >
T &
operator+=( T &, int )
{
}
--------
I expect following warning message.
----
testcase.C: In function 'T& operator+=(T&, int)':
testcase.C:5:1: warning: no return statement in function returning non-void
[-Wreturn-type]
----
All of following versions are missing warning.
Ubuntu/Linaro 4.4.4-14ubuntu5
4.5.2
4.5.3 20110324
4.6.0
4.6.1 20110325
4.7.0 20110402
More information about the Gcc-bugs
mailing list