PR c++/58636
* call.c (build_list_conv): Don't try to build a list of references.
From-SVN: r212503
+2014-07-13 Jason Merrill <jason@redhat.com>
+
+ PR c++/58636
+ * call.c (build_list_conv): Don't try to build a list of references.
+
2014-07-13 Edward Smith-Rowland <3dw4rd@verizon.net>
PR C++/60209 - Declaration of user-defined literal operator cause error
/* But no narrowing conversions. */
flags |= LOOKUP_NO_NARROWING;
+ /* Can't make an array of these types. */
+ if (TREE_CODE (elttype) == REFERENCE_TYPE
+ || TREE_CODE (elttype) == FUNCTION_TYPE
+ || VOID_TYPE_P (elttype))
+ return NULL;
+
FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (ctor), i, val)
{
conversion *sub
--- /dev/null
+// PR c++/58636
+// { dg-do compile { target c++11 } }
+
+#include <initializer_list>
+
+// { dg-error "pointer to reference" "" { target *-*-* } 0 }
+int foo(std::initializer_list<int&&>);
+
+int i = foo({ 0 }); // { dg-error "std::initializer_list" }