https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96082
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>: https://gcc.gnu.org/g:1c4d223d37d067f5d372688c0c0cc5a05d977df7 commit r10-8576-g1c4d223d37d067f5d372688c0c0cc5a05d977df7 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. (cherry picked from commit 97def1f34c134d78d4423e9ac3e9b262417ea390)