PR c++/61465
* call.c (convert_like_real) [ck_identity]: Call mark_rvalue_use
after pulling out an element from a CONSTRUCTOR.
From-SVN: r215413
+2014-09-19 Jason Merrill <jason@redhat.com>
+
+ PR c++/61465
+ * call.c (convert_like_real) [ck_identity]: Call mark_rvalue_use
+ after pulling out an element from a CONSTRUCTOR.
+
2014-09-18 Jakub Jelinek <jakub@redhat.com>
PR c++/63248
return expr;
}
case ck_identity:
- expr = mark_rvalue_use (expr);
if (BRACE_ENCLOSED_INITIALIZER_P (expr))
{
int nelts = CONSTRUCTOR_NELTS (expr);
else
gcc_unreachable ();
}
+ expr = mark_rvalue_use (expr);
if (type_unknown_p (expr))
expr = instantiate_type (totype, expr, complain);
--- /dev/null
+// PR c++/61465
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wunused-but-set-parameter" }
+
+struct Foo {
+ Foo(void* x) : y{static_cast<char*>(x)} {}
+ char* y;
+};