aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index d7335a0..18f15a8 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -8085,11 +8085,6 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl)
tsubst (TREE_TYPE (t), args, complain, NULL_TREE);
break;
- case OFFSETOF_EXPR:
- t = tsubst_copy_and_build (TREE_OPERAND (t, 0), args, complain,
- in_decl, false);
- return fold_offsetof (t);
-
default:
gcc_assert (!STATEMENT_CODE_P (TREE_CODE (t)));
@@ -8630,6 +8625,9 @@ tsubst_copy_and_build (tree t,
tsubst_copy (TREE_TYPE (t), args, complain,
in_decl));
+ case OFFSETOF_EXPR:
+ return fold_offsetof (RECUR (TREE_OPERAND (t, 0)));
+
default:
return tsubst_copy (t, args, complain, in_decl);
}