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: unassig...@gcc.gnu.org
        ReportedBy: fl...@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

Reply via email to