PR c++/87781 - detect invalid elaborated-type-specifier.
authorMarek Polacek <polacek@redhat.com>
Mon, 19 Nov 2018 21:37:01 +0000 (21:37 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Mon, 19 Nov 2018 21:37:01 +0000 (21:37 +0000)
commit9047dd02b84c42d610cf84037cb7db8963245228
tree06843088990a3eaf7367527146b567b20c44a2c9
parent0da4824836328ffcc9a5d96a242756bad602d2fc
PR c++/87781 - detect invalid elaborated-type-specifier.

* parser.c (cp_parser_elaborated_type_specifier): Ensure that
typename follows a nested-name-specifier.

* g++.dg/parse/elab3.C: New test.
* g++.dg/template/crash115.C: Adjust dg-error.

From-SVN: r266285
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/parse/elab3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/crash115.C