/cp
2018-03-21 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/84972
* decl.c (maybe_deduce_size_from_array_init): Set TREE_TYPE to
error_mark_node when check_array_designated_initializer fails.
/testsuite
2018-03-21 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/84972
* g++.dg/ext/desig10.C: New.
From-SVN: r258746
+2018-03-21 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/84972
+ * decl.c (maybe_deduce_size_from_array_init): Set TREE_TYPE to
+ error_mark_node when check_array_designated_initializer fails.
+
2018-03-21 Jakub Jelinek <jakub@redhat.com>
PR c++/84961
failure = 1;
}
- if (!failure)
+ if (failure)
+ TREE_TYPE (decl) = error_mark_node;
+ else
{
failure = cp_complete_array_type (&TREE_TYPE (decl), initializer,
do_default);
+2018-03-21 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/84972
+ * g++.dg/ext/desig10.C: New.
+
2018-03-21 Thomas Koenig <tkoenig@gcc.gnu.org>
- Harald Anlauf <anlauf@gmx.de>
+ Harald Anlauf <anlauf@gmx.de>
PR fortran/84957
* gfortran.dg/pr84957.f90: New test.
--- /dev/null
+// PR c++/84972
+// { dg-additional-options "-w" }
+
+char(a[])({.a = 0}); // { dg-error "designated initializer" }