This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/61093] faulty reference initialization in return statement


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]