http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57155
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-05-03 09:08:03 UTC --- const int& cref = (const int&)buf[0]; This creates a temporary of type int, initialized with buf[0], and binds a reference to it, the same as: const int& cref = int(buf[0]); So it's correct that it has the same value as buf[0].