This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52231] [missed optimization/diagnostics] address-of-reference
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 13 Feb 2012 18:13:23 +0000
- Subject: [Bug c++/52231] [missed optimization/diagnostics] address-of-reference
- Auto-submitted: auto-generated
- References: <bug-52231-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52231
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-02-13
Ever Confirmed|0 |1
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-02-13 18:13:23 UTC ---
But the language guarantees that for a program without undefined behaviour a
reference is always bound to a valid object.
int* i = nullptr;
int& r = *i; // undefined
if (&r == 0) // cannot be true
;