https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87709
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Patrick Palka <ppa...@gcc.gnu.org>: https://gcc.gnu.org/g:5f1a2cb9c2dc09eed53da5d5787d14bec700b10b commit r12-99-g5f1a2cb9c2dc09eed53da5d5787d14bec700b10b Author: Patrick Palka <ppa...@redhat.com> Date: Sat Apr 24 00:01:42 2021 -0400 c++: Hard error with tentative parse and CTAD [PR87709] When parsing e.g. the operand of sizeof, where both types and expressions are accepted, if during the tentative type parse we encounter an unexpected template placeholder, we must simulate an error rather than issue a real error because the expression parse can still succeed. gcc/cp/ChangeLog: PR c++/87709 * parser.c (cp_parser_type_id_1): If we see a template placeholder, first try simulating an error before issuing a real error. gcc/testsuite/ChangeLog: PR c++/87709 * g++.dg/cpp1z/class-deduction86.C: New test.