* decl.c (grokdeclarator): Check if declarator is null.
* g++.dg/ext/flexary31.C: New test.
From-SVN: r266581
+2018-11-28 Marek Polacek <polacek@redhat.com>
+
+ PR c++/88222 - ICE with bit-field with invalid type.
+ * decl.c (grokdeclarator): Check if declarator is null.
+
2018-11-28 Jakub Jelinek <jakub@redhat.com>
PR c++/87476
if (in_system_header_at (input_location))
/* Do not warn on flexible array members in system
headers because glibc uses them. */;
- else if (name)
+ else if (name && declarator)
pedwarn (declarator->id_loc, OPT_Wpedantic,
"ISO C++ forbids flexible array member %qs", name);
else
+2018-11-28 Marek Polacek <polacek@redhat.com>
+
+ PR c++/88222 - ICE with bit-field with invalid type.
+ * g++.dg/ext/flexary31.C: New test.
+
2018-11-28 David Edelsohn <dje.gcc@gmail.com>
* g++.dg/debug/dwarf2/pr86900.C: XFAIL AIX.
--- /dev/null
+// PR c++/88222
+// { dg-options -Wno-pedantic }
+
+typedef char a[];
+
+class S {
+ a : 4; // { dg-error "bit-field" }
+};