PR c++/90572 - wrong disambiguation in friend declaration.
authorMarek Polacek <polacek@redhat.com>
Sat, 25 May 2019 14:39:12 +0000 (14:39 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Sat, 25 May 2019 14:39:12 +0000 (14:39 +0000)
commitc3b2fdf9f82f020edf22422b5e0dd3fbdf33267f
treee40f81f4992a387874f77b21129761b52fd8f188
parente266148f697d9316b696ac6ce26cda44afc49dfd
PR c++/90572 - wrong disambiguation in friend declaration.

* parser.c (cp_parser_constructor_declarator_p): Don't allow missing
typename for friend declarations.

* g++.dg/cpp2a/typename16.C: New test.
* g++.dg/parse/friend13.C: New test.

From-SVN: r271619
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp2a/typename16.C [new file with mode: 0644]
gcc/testsuite/g++.dg/parse/friend13.C [new file with mode: 0644]