https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88180
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Tue Jan 8 10:25:54 2019 New Revision: 267713 URL: https://gcc.gnu.org/viewcvs?rev=267713&root=gcc&view=rev Log: Backported from mainline 2018-12-20 Jakub Jelinek <ja...@redhat.com> PR c++/88180 * parser.c (cp_parser_class_specifier_1): If cp_parser_check_type_definition fails, skip default arguments, NSDMIs, etc. like for erroneous template args. * g++.dg/parse/pr88180.C: New test. * g++.dg/pr85039-1.C: Don't expect diagnostics inside of the type definition's NSDMIs. Added: branches/gcc-8-branch/gcc/testsuite/g++.dg/parse/pr88180.C Modified: branches/gcc-8-branch/gcc/cp/ChangeLog branches/gcc-8-branch/gcc/cp/parser.c branches/gcc-8-branch/gcc/testsuite/ChangeLog branches/gcc-8-branch/gcc/testsuite/g++.dg/pr85039-1.C