diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2002-01-02 02:31:58 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2002-01-02 02:31:58 +0000 |
commit | 1574ef130fb3149f09b3a1b36c65873a6e494582 (patch) | |
tree | 88f850f8f5e7beb19776302640e41667d82628ef /gcc/tree.h | |
parent | 6180abdb9dfdb541014932a732916a47a8bab8a5 (diff) | |
download | gcc-1574ef130fb3149f09b3a1b36c65873a6e494582.zip gcc-1574ef130fb3149f09b3a1b36c65873a6e494582.tar.gz gcc-1574ef130fb3149f09b3a1b36c65873a6e494582.tar.bz2 |
c-common.h (genrtl_expr_stmt_value): Declare.
* c-common.h (genrtl_expr_stmt_value): Declare.
* c-semantics.c (genrtl_goto_stmt): Redirect to...
(genrtl_goto_stmt_value): ... this new function. Pass new
argument down to expand_expr_stmt_value, taking
TREE_ADDRESSABLE into account.
* c-common.c (c_expand_expr): Mark the last EXPR_STMT of a
STMT_EXPR as addressable, i.e., one whose result we want.
* expr.c (expand_expr): Don't save expression statement value
of labeled_blocks or loop_exprs.
* stmt.c (expand_expr_stmt): Redirect to...
(expand_expr_stmt_value): ... this new function. Use new
argument to tell whether to save expression value.
(expand_end_stmt_expr): Reset last_expr_type and
last_expr_value if we don't have either.
* tree-inline.c (declare_return_variable): Mark its use
statement as addressable.
* tree.h: Document new use of TREE_ADDRESSABLE.
(expand_expr_stmt_value): Declare.
From-SVN: r48456
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1,6 +1,6 @@ /* Front-end tree definitions for GNU compiler. - Copyright (C) 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 - Free Software Foundation, Inc. + Copyright (C) 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, + 2001, 2002 Free Software Foundation, Inc. This file is part of GCC. @@ -161,7 +161,9 @@ struct tree_common TREE_ADDRESSABLE in VAR_DECL, FUNCTION_DECL, FIELD_DECL, CONSTRUCTOR, LABEL_DECL, - ..._TYPE, IDENTIFIER_NODE + ..._TYPE, IDENTIFIER_NODE. + In a STMT_EXPR, it means we want the result of the enclosed + expression. static_flag: @@ -258,8 +260,7 @@ struct tree_common expressions, VAR_DECL, PARM_DECL, FIELD_DECL, FUNCTION_DECL, IDENTIFIER_NODE TYPE_BOUNDED in - ..._TYPE -*/ + ..._TYPE */ /* Define accessors for the fields that all tree nodes have (though some fields are not used for all kinds of nodes). */ @@ -2719,6 +2720,7 @@ extern void expand_fixups PARAMS ((rtx)); extern tree expand_start_stmt_expr PARAMS ((void)); extern tree expand_end_stmt_expr PARAMS ((tree)); extern void expand_expr_stmt PARAMS ((tree)); +extern void expand_expr_stmt_value PARAMS ((tree, int)); extern int warn_if_unused_value PARAMS ((tree)); extern void expand_decl_init PARAMS ((tree)); extern void clear_last_expr PARAMS ((void)); |