Comments
Patch
commit 31f87e04a3bcdfe18c2672fe9725d96117a95031
Author: Jason Merrill <jason@redhat.com>
Date: Wed Jan 2 14:14:24 2013 -0500
* decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
@@ -10829,7 +10829,7 @@ check_default_argument (tree decl, tree arg)
parameter type. */
++cp_unevaluated_operand;
perform_implicit_conversion_flags (decl_type, arg, tf_warning_or_error,
- LOOKUP_NORMAL);
+ LOOKUP_IMPLICIT);
--cp_unevaluated_operand;
if (warn_zero_as_null_pointer_constant
new file mode 100644
@@ -0,0 +1,12 @@
+struct A
+{
+ A(const char *);
+ explicit A(const int *);
+};
+
+void f (A a = 0);
+
+int main()
+{
+ f();
+}