diff options
author | Jason Merrill <jason@redhat.com> | 2003-05-20 16:24:08 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2003-05-20 16:24:08 -0400 |
commit | 1cd69e2bed74053a58529b14e13373a474baecd4 (patch) | |
tree | 47fe4e814049329aebee13405098f61ed66bd1d9 /gcc/tree.c | |
parent | a60a9553a1193112da334f4acb4b705c3f4745a5 (diff) | |
download | gcc-1cd69e2bed74053a58529b14e13373a474baecd4.zip gcc-1cd69e2bed74053a58529b14e13373a474baecd4.tar.gz gcc-1cd69e2bed74053a58529b14e13373a474baecd4.tar.bz2 |
tree.c (expr_last): New fn.
* tree.c (expr_last): New fn.
* tree.h: Declare it.
* objc/objc-act (expr_last): Rename to objc_expr_last.
From-SVN: r67035
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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, |