===================================================================
@@ -3370,7 +3370,8 @@ add_list_candidates (tree fns, tree first_arg,
;
/* If the class has a list ctor, try passing the list as a single
argument first, but only consider list ctors. */
- else if (TYPE_HAS_LIST_CTOR (totype))
+ else if (TYPE_HAS_LIST_CTOR (totype)
+ && cxx_dialect != cxx98)
{
flags |= LOOKUP_LIST_ONLY;
args = make_tree_vector_single (init_list);
===================================================================
@@ -0,0 +1,10 @@
+// PR c++/57947
+// { dg-options "-std=c++98" }
+
+namespace std
+{
+ template <class E> class initializer_list {};
+ template <int N> struct D { D(initializer_list<int>) {} };
+ D<0> d {1, 2, 3}; // { dg-error "constructor|no matching" }
+ // { dg-warning "initializer list" "" { target *-*-* } 8 }
+}