aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 3271a5b..efb4e22 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -1123,6 +1123,18 @@ tree_cons (purpose, value, chain)
return node;
}
+/* Return the last expression in a sequence of COMPOUND_EXPRs. */
+
+tree
+expr_last (expr)
+ tree expr;
+{
+ if (expr == NULL_TREE)
+ return expr;
+ while (TREE_CODE (expr) == COMPOUND_EXPR)
+ expr = TREE_OPERAND (expr, 1);
+ return expr;
+}
/* Return the size nominally occupied by an object of type TYPE
when it resides in memory. The value is measured in units of bytes,