]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: Template keyword following :: [PR96082]
authorMarek Polacek <polacek@redhat.com>
Tue, 4 Aug 2020 13:35:25 +0000 (09:35 -0400)
committerGiuliano Belinassi <giuliano.belinassi@usp.br>
Mon, 17 Aug 2020 18:07:35 +0000 (15:07 -0300)
commit87a3c76d4674c5232acaa27698ce9d6b24566fdd
tree391d8fbe4bb7a21766753e3ea79ef19c999f5c0f
parent288794ad8cd55f599f77de67d459e47d748e6825
c++: Template keyword following :: [PR96082]

In r9-4235 I tried to make sure that the template keyword follows
a nested-name-specifier.  :: is a valid nested-name-specifier, so
I also have to check 'globalscope' before giving the error.

gcc/cp/ChangeLog:

PR c++/96082
* parser.c (cp_parser_elaborated_type_specifier): Allow
'template' following ::.

gcc/testsuite/ChangeLog:

PR c++/96082
* g++.dg/template/template-keyword3.C: New test.
gcc/cp/parser.c
gcc/testsuite/g++.dg/template/template-keyword3.C [new file with mode: 0644]