]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: Document why TARGET_EXPR is not handled in tsubst_expr
authorEgas Ribeiro <egas.g.ribeiro@tecnico.ulisboa.pt>
Mon, 8 Dec 2025 18:04:42 +0000 (18:04 +0000)
committerPatrick Palka <ppalka@redhat.com>
Mon, 8 Dec 2025 19:28:21 +0000 (14:28 -0500)
commit24efdb0974e19f9c31731dc0d8bdf52044705b50
tree455f4861141065f2e95bf886bc44017b38ffa0da
parent03562c1e023d01cacf099a40842e617d27148c74
c++: Document why TARGET_EXPR is not handled in tsubst_expr

TARGET_EXPR represents semantic temporary objects and is deliberately
not handled by tsubst routines, which expect syntactic templated trees.
Add a comment and gcc_unreachable to make this explicit.

gcc/cp/ChangeLog:

* pt.cc (tsubst_expr): Add TARGET_EXPR case with explanatory
comment and gcc_unreachable.

Signed-off-by: Egas Ribeiro <egas.g.ribeiro@tecnico.ulisboa.pt>
Reviewed-by: Patrick Palka <ppalka@redhat.com>
gcc/cp/pt.cc