public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/48586] New: missing no return warning in template operator
@ 2011-04-13 7:03 flast at flast dot jp
2011-04-13 7:37 ` [Bug c++/48586] " redi at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: flast at flast dot jp @ 2011-04-13 7:03 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/48586] missing no return warning in template operator
2011-04-13 7:03 [Bug c++/48586] New: missing no return warning in template operator flast at flast dot jp
@ 2011-04-13 7:37 ` redi at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2011-04-13 7:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48586
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.04.13 07:37:23
Ever Confirmed|0 |1
Severity|normal |enhancement
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-04-13 07:37:23 UTC ---
you get a warning when the template is instantiated, but it would be better to
get the warning earlier
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-13 7:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-13 7:03 [Bug c++/48586] New: missing no return warning in template operator flast at flast dot jp
2011-04-13 7:37 ` [Bug c++/48586] " redi at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).