https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111529
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:a644775c363979bc25951532819ffa0f244b82f4 commit r11-11448-ga644775c363979bc25951532819ffa0f244b82f4 Author: Jason Merrill <ja...@redhat.com> Date: Fri Sep 22 12:10:11 2023 +0100 c++: unroll pragma in templates [PR111529] We were failing to handle ANNOTATE_EXPR in tsubst_copy_and_build, leading to problems with substitution of any wrapped expressions. Let's also not tell users that lambda templates are available in C++14. PR c++/111529 gcc/cp/ChangeLog: * parser.c (cp_parser_lambda_declarator_opt): Don't suggest -std=c++14 for lambda templates. * pt.c (tsubst_expr): Move ANNOTATE_EXPR handling... (tsubst_copy_and_build): ...here. gcc/testsuite/ChangeLog: * g++.dg/ext/unroll-4.C: New test. (cherry picked from commit 9c62af101e11e1cce573c2b3d2e18b403412dbc8)