PR c++/88358 - name wrongly treated as type.
authorMarek Polacek <polacek@redhat.com>
Mon, 28 Jan 2019 22:14:27 +0000 (22:14 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Mon, 28 Jan 2019 22:14:27 +0000 (22:14 +0000)
commitb6d0f41ac5c1786911858b4763bb6f92519166f4
treeca1b40716b10b941b960f762ca38414b38cab433
parent2c5b39203276b00496ef32468ccb61d445aef97b
PR c++/88358 - name wrongly treated as type.

* parser.c (cp_parser_direct_declarator): Don't assume a qualified-id
in parameter-list is a type if the function's declarator-id is not
qualified.

* g++.dg/cpp2a/typename1.C: Add dg-error.
* g++.dg/cpp2a/typename13.C: New test.
* g++.dg/cpp2a/typename6.C: Make a function name qualified.
Add typename.

From-SVN: r268343
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp2a/typename1.C
gcc/testsuite/g++.dg/cpp2a/typename13.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp2a/typename6.C