This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/21672] Loses temporary in complex expression
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 May 2005 23:46:39 -0000
- Subject: [Bug c++/21672] Loses temporary in complex expression
- References: <20050519212022.21672.igodard@pacbell.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-19 23:46 -------
(In reply to comment #12)
> In particular, once you get all the template armwaving out of it:
>
> int& foo(int i) { return i; }
>
> should warn and does not.
The following example does not warn before 4.0.0:
template<int>
int& foo(int i) { return i; }
int &g = foo<1>(1);
So that problem was already fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21672