diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-19 19:34:23 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-19 19:34:23 +0000 |
commit | 8495c0caa5e5c7405db047eacf57e0bc0a98e473 (patch) | |
tree | 8c9a0bb986a33bc83bc0dbbec28fa39603c3a2c6 /gcc/gimplify.c | |
parent | 27664a4b933774261748e715595bcb8fc1ecba33 (diff) | |
download | gcc-8495c0caa5e5c7405db047eacf57e0bc0a98e473.tar.gz |
* c-common.c, c-common.h (lang_gimplify_stmt): Remove.
* c-gimplify.c: Remove unnecessary prototypes.
(c_gimplify_stmt): Merge into ...
(c_gimplify_expr): ... here. Don't play with prep_stmt.
* c-semantics.c (prep_stmt): Remove.
* gimplify.c (annotate_one_with_locus): Break out from ...
(annotate_all_with_locus): ... here.
(gimplify_expr): Add locus to expressions even if pre/post queues
are not present.
cp/
* cp-gimplify.c: Remove unnecessary prototypes.
(cp_gimplify_stmt): Merge into ...
(cp_gimplify_expr): ... here. Move to end of file. Handle
stmts_are_full_exprs_p frobbing.
* cp-tree.h (cp_gimplify_stmt): Remove.
* pt.c (tsubst_expr): Merge prep_stmt and unify.
* tree.c (init_tree): Don't set lang_gimplify_stmt.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83397 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 2e7d30e9dce..92c52a9365b 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -563,6 +563,15 @@ should_carry_locus_p (tree stmt) return true; } +static void +annotate_one_with_locus (tree t, location_t locus) +{ + if (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (t))) + && ! EXPR_HAS_LOCATION (t) + && should_carry_locus_p (t)) + annotate_with_locus (t, locus); +} + void annotate_all_with_locus (tree *stmt_p, location_t locus) { @@ -583,10 +592,7 @@ annotate_all_with_locus (tree *stmt_p, location_t locus) abort (); #endif - if (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (t))) - && ! EXPR_HAS_LOCATION (t) - && should_carry_locus_p (t)) - annotate_with_locus (t, locus); + annotate_one_with_locus (t, locus); } } @@ -3558,6 +3564,10 @@ gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p, annotate_all_with_locus (&internal_pre, input_location); *expr_p = internal_pre; } + else if (TREE_CODE (*expr_p) == STATEMENT_LIST) + annotate_all_with_locus (expr_p, input_location); + else + annotate_one_with_locus (*expr_p, input_location); goto out; } |