* typeck2.c (cxx_incomplete_type_diagnostic): Handle
init_list_type_node.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177810
138bc75d-0d04-0410-961f-
82ee72b054a4
+2011-08-16 Jason Merrill <jason@redhat.com>
+
+ PR c++/50054
+ * typeck2.c (cxx_incomplete_type_diagnostic): Handle
+ init_list_type_node.
+
2011-08-13 Jason Merrill <jason@redhat.com>
PR c++/50075
break;
case LANG_TYPE:
+ if (type == init_list_type_node)
+ {
+ emit_diagnostic (diag_kind, input_location, 0,
+ "invalid use of brace-enclosed initializer list");
+ break;
+ }
gcc_assert (type == unknown_type_node);
if (value && TREE_CODE (value) == COMPONENT_REF)
goto bad_member;
+2011-08-16 Jason Merrill <jason@redhat.com>
+
+ PR c++/50054
+ * g++.dg/cpp0x/initlist56.C: New.
+
2011-08-15 H.J. Lu <hongjiu.lu@intel.com>
PR testsuite/50085
--- /dev/null
+// PR c++/50054
+// { dg-options -std=c++0x }
+
+void g( const int& (a)[1] ) {} // { dg-error "array of references" }
+
+int main () {
+ g( { 1, 2 } ); // { dg-error "initializer list" }
+}