r260622 - in /trunk/gcc: cp/ChangeLog cp/cvt.c ...
jason@gcc.gnu.org
jason@gcc.gnu.org
Wed May 23 17:21:00 GMT 2018
Author: jason
Date: Wed May 23 17:21:39 2018
New Revision: 260622
URL: https://gcc.gnu.org/viewcvs?rev=260622&root=gcc&view=rev
Log:
Fix cast to rvalue reference from prvalue.
* cvt.c (diagnose_ref_binding): Handle rvalue reference.
* rtti.c (build_dynamic_cast_1): Don't try to build a reference to
non-class type. Handle xvalue argument.
* typeck.c (build_reinterpret_cast_1): Allow cast from prvalue to
rvalue reference.
* semantics.c (finish_compound_literal): Do direct-initialization,
not cast, to initialize a reference.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/rv-cast6.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cvt.c
trunk/gcc/cp/rtti.c
trunk/gcc/cp/semantics.c
trunk/gcc/cp/typeck.c
More information about the Gcc-cvs
mailing list