+2020-02-24 Marek Polacek <polacek@redhat.com>
+
+ PR c++/93869 - ICE with -Wmismatched-tags.
+ * parser.c (cp_parser_check_class_key): Check class_key earlier.
+
2020-02-24 Marek Polacek <polacek@redhat.com>
PR c++/93712 - ICE with ill-formed array list-initialization.
if (!warn_mismatched_tags && !warn_redundant_tags)
return;
+ /* Only consider the true class-keys below and ignore typename_type,
+ etc. that are not C++ class-keys. */
+ if (class_key != class_type
+ && class_key != record_type
+ && class_key != union_type)
+ return;
+
tree type_decl = TYPE_MAIN_DECL (type);
tree name = DECL_NAME (type_decl);
/* Look up the NAME to see if it unambiguously refers to the TYPE
tree decl = cp_parser_lookup_name_simple (parser, name, input_location);
pop_deferring_access_checks ();
- /* Only consider the true class-keys below and ignore typename_type,
- etc. that are not C++ class-keys. */
- if (class_key != class_type
- && class_key != record_type
- && class_key != union_type)
- return;
-
/* The class-key is redundant for uses of the CLASS_TYPE that are
neither definitions of it nor declarations, and for which name
lookup returns just the type itself. */
+2020-02-24 Marek Polacek <polacek@redhat.com>
+
+ PR c++/93869 - ICE with -Wmismatched-tags.
+ * g++.dg/warn/Wmismatched-tags-2.C: New test.
+
2020-02-20 Mark Eggleston <mark.eggleston@codethink.com>
PR fortran/93835