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
This commit is contained in:
parent
a60a9553a1
commit
1cd69e2bed
@ -1,3 +1,9 @@
|
||||
2003-05-20 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* tree.c (expr_last): New fn.
|
||||
* tree.h: Declare it.
|
||||
* objc/objc-act (expr_last): Rename to objc_expr_last.
|
||||
|
||||
2003-05-20 J"orn Rennecke <joern.rennecke@superh.com>
|
||||
|
||||
* sh.c (sh_register_move_cost): Add clase for moving between
|
||||
|
@ -217,7 +217,7 @@ static void really_start_method PARAMS ((tree, tree));
|
||||
static int comp_method_with_proto PARAMS ((tree, tree));
|
||||
static int comp_proto_with_proto PARAMS ((tree, tree));
|
||||
static tree get_arg_type_list PARAMS ((tree, int, int));
|
||||
static tree expr_last PARAMS ((tree));
|
||||
static tree objc_expr_last PARAMS ((tree));
|
||||
|
||||
/* Utilities for debugging and error diagnostics. */
|
||||
|
||||
@ -6998,7 +6998,7 @@ encode_field_decl (field_decl, curtype, format)
|
||||
}
|
||||
|
||||
static tree
|
||||
expr_last (complex_expr)
|
||||
objc_expr_last (complex_expr)
|
||||
tree complex_expr;
|
||||
{
|
||||
tree next;
|
||||
@ -7059,7 +7059,7 @@ start_method_def (method)
|
||||
|
||||
if (arg_decl)
|
||||
{
|
||||
tree last_expr = expr_last (arg_decl);
|
||||
tree last_expr = objc_expr_last (arg_decl);
|
||||
|
||||
/* Unite the abstract decl with its name. */
|
||||
TREE_OPERAND (last_expr, 0) = KEYWORD_ARG_NAME (arglist);
|
||||
@ -7195,7 +7195,7 @@ really_start_method (method, parmlist)
|
||||
{
|
||||
/* Unite the complex decl (specified in the abstract decl) with the
|
||||
function decl just synthesized..(int *), (int (*)()), (int (*)[]). */
|
||||
tree save_expr = expr_last (ret_decl);
|
||||
tree save_expr = objc_expr_last (ret_decl);
|
||||
|
||||
TREE_OPERAND (save_expr, 0) = method_decl;
|
||||
method_decl = ret_decl;
|
||||
|
12
gcc/tree.c
12
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,
|
||||
|
@ -2532,6 +2532,7 @@ extern tree pedantic_non_lvalue PARAMS ((tree));
|
||||
|
||||
extern tree convert PARAMS ((tree, tree));
|
||||
extern unsigned int expr_align PARAMS ((tree));
|
||||
extern tree expr_last PARAMS ((tree));
|
||||
extern tree size_in_bytes PARAMS ((tree));
|
||||
extern HOST_WIDE_INT int_size_in_bytes PARAMS ((tree));
|
||||
extern tree bit_position PARAMS ((tree));
|
||||
|
Loading…
Reference in New Issue
Block a user