This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/61093] faulty reference initialization in return statement
- 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: Wed, 07 May 2014 10:36:37 +0000
- Subject: [Bug c++/61093] faulty reference initialization in return statement
- Auto-submitted: auto-generated
- References: <bug-61093-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61093
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Actually to be precise it's equivalent to
return const_cast<int&>(reinterpret_cast<const int&>(arg));
See 5.2.3 [expr.type.conv] paragraph 1 and 5.4 [expr.cast] paragraph 4 in the
standard.