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: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 May 2005 23:35:06 -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 gdr at integrable-solutions dot net 2005-05-19 23:35 -------
Subject: Re: Loses temporary in complex expression
"pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| Here is another example where we don't know for sure it shows how the compiler uses operators in
| C++:
| template<class T> const
| T& g(T t1, const T& t2) { return t1.h(t2); }
|
| struct f{ f &h(const f&);};
| f i;
| f j;
|
| f h = g(i , j);
|
| h is the operator for |= and g is the operator for |.
And we can construct more. But it does not rule out the fact that we
should handle the simple cases.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21672