* call.c (build_special_member_call): Handle CONSTRUCTOR.
From-SVN: r242562
2016-11-17 Jason Merrill <jason@redhat.com>
+ PR c++/78369 - {} as default argument
+ * call.c (build_special_member_call): Handle CONSTRUCTOR.
+
PR c++/68377
* parser.c (cp_parser_fold_expression): Check TREE_NO_WARNING.
if (!reference_related_p (class_type, TREE_TYPE (arg)))
arg = perform_implicit_conversion_flags (class_type, arg,
tf_warning, flags);
- if (TREE_CODE (arg) == TARGET_EXPR
+ if ((TREE_CODE (arg) == TARGET_EXPR
+ || TREE_CODE (arg) == CONSTRUCTOR)
&& (same_type_ignoring_top_level_qualifiers_p
(class_type, TREE_TYPE (arg))))
{
--- /dev/null
+// PR c++/78369
+// { dg-do compile { target c++11 } }
+
+struct A { };
+inline void f(struct A a = {}) {}
+
+int main()
+{
+ f();
+ return 0;
+}