DR 799
* typeck.c (build_reinterpret_cast_1): reinterpret_cast to the
same scalar type is an rvalue.
From-SVN: r217276
2014-11-09 Jason Merrill <jason@redhat.com>
+ DR 799
+ * typeck.c (build_reinterpret_cast_1): reinterpret_cast to the
+ same scalar type is an rvalue.
+
DR 2007
* call.c (build_new_op_1): Don't do non-class lookup for =, -> or [].
|| TYPE_PTR_OR_PTRMEM_P (type))
&& same_type_p (type, intype))
/* DR 799 */
- return fold_if_not_in_template (build_nop (type, expr));
+ return rvalue (expr);
else if ((TYPE_PTRFN_P (type) && TYPE_PTRFN_P (intype))
|| (TYPE_PTRMEMFUNC_P (type) && TYPE_PTRMEMFUNC_P (intype)))
return fold_if_not_in_template (build_nop (type, expr));
struct Y { Y(int &); };
int v;
-Y y1(reinterpret_cast<int>(v));
+Y y1(reinterpret_cast<int>(v)); // { dg-error "" }