This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52901] invalid rvalue reference
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 08 Apr 2012 13:48:57 +0000
- Subject: [Bug c++/52901] invalid rvalue reference
- Auto-submitted: auto-generated
- References: <bug-52901-4@http.gcc.gnu.org/bugzilla/>
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.