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>
in response to the saved STMT_IS_FULL_EXPR_P setting. */
gcc_unreachable ();
+ case TARGET_EXPR:
+ /* TARGET_EXPR represents temporary objects and should not appear in
+ templated trees. */
+ gcc_unreachable ();
+
case OFFSET_REF:
{
/* We should only get here for an OFFSET_REF like A::m; a .* in a