https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96082
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>: https://gcc.gnu.org/g:97def1f34c134d78d4423e9ac3e9b262417ea390 commit r11-2560-g97def1f34c134d78d4423e9ac3e9b262417ea390 Author: Marek Polacek <pola...@redhat.com> Date: Tue Aug 4 09:35:25 2020 -0400 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.