PR c++/50034
* call.c (convert_arg_to_ellipsis): force_rvalue only in
potentially evaluated context.
From-SVN: r177722
+2011-08-12 Jason Merrill <jason@redhat.com>
+
+ PR c++/50034
+ * call.c (convert_arg_to_ellipsis): force_rvalue only in
+ potentially evaluated context.
+
2011-08-12 Richard Guenther <rguenther@suse.de>
* call.c (build_over_call): Instead of memcpy use an
{
/* Build up a real lvalue-to-rvalue conversion in case the
copy constructor is trivial but not callable. */
- if (CLASS_TYPE_P (arg_type))
+ if (!cp_unevaluated_operand && CLASS_TYPE_P (arg_type))
force_rvalue (arg, tf_warning_or_error);
/* [expr.call] 5.2.2/7:
+2011-08-12 Jason Merrill <jason@redhat.com>
+
+ PR c++/50034
+ * g++.dg/cpp0x/defaulted28.C: Add unevaluated case.
+
2011-08-12 Uros Bizjak <ubizjak@gmail.com>
* gcc.dg/builtins-67.c: New test.
// PR c++/49102
+// PR c++/50034
// { dg-options -std=c++0x }
struct A {
A(A const&) = default; // { dg-error "private" }
};
-void f(...) { }
+int f(...) { }
int main() {
A a;
f(a); // { dg-error "this context" }
+ sizeof(f(a)); // OK because unevaluated
}