[Bug c++/52901] invalid rvalue reference
daniel.kruegler at googlemail dot com
gcc-bugzilla@gcc.gnu.org
Sun Apr 8 13:49:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52901
Daniel Krügler <daniel.kruegler at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel.kruegler at
| |googlemail dot com
--- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> 2012-04-08 13:48:57 UTC ---
I don't see what this example is supposed to demonstrate. the two lines
X&& x1 = f();
and
X&& y1 = f();
produce references to invalid memory, any access to that is undefined
behaviour. You cannot impose any reliable constraints on the values such
references.
More information about the Gcc-bugs
mailing list