diff options
author | Marek Polacek <polacek@redhat.com> | 2017-05-17 08:11:15 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2017-05-17 08:11:15 +0000 |
commit | b2fa0a8bdfe15c427f5750f008509ed518683e2b (patch) | |
tree | dfc3305649a9ef1e3056be43490be2749e68b03f /gcc/c-family | |
parent | 8508a5b58ff4eefe161489d10623a9a24899c0b2 (diff) | |
download | gcc-b2fa0a8bdfe15c427f5750f008509ed518683e2b.zip gcc-b2fa0a8bdfe15c427f5750f008509ed518683e2b.tar.gz gcc-b2fa0a8bdfe15c427f5750f008509ed518683e2b.tar.bz2 |
Bye bye, c_save_expr.
From-SVN: r248139
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c-family/c-common.c | 20 | ||||
-rw-r--r-- | gcc/c-family/c-common.h | 1 |
3 files changed, 7 insertions, 20 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index dd2cd51..5cd4494 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,9 @@ +2017-05-17 Marek Polacek <polacek@redhat.com> + + * c-common.c (c_save_expr): Remove. + (c_common_truthvalue_conversion): Remove a call to c_save_expr. + * c-common.h (c_save_expr): Remove declaration. + 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de> PR c/35441 diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index ad686d2..f606e94 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -3164,24 +3164,6 @@ c_wrap_maybe_const (tree expr, bool non_const) return expr; } -/* Wrap a SAVE_EXPR around EXPR, if appropriate. Like save_expr, but - for C folds the inside expression and wraps a C_MAYBE_CONST_EXPR - around the SAVE_EXPR if needed so that c_fully_fold does not need - to look inside SAVE_EXPRs. */ - -tree -c_save_expr (tree expr) -{ - bool maybe_const = true; - if (c_dialect_cxx ()) - return save_expr (expr); - expr = c_fully_fold (expr, false, &maybe_const); - expr = save_expr (expr); - if (!maybe_const) - expr = c_wrap_maybe_const (expr, true); - return expr; -} - /* Return whether EXPR is a declaration whose address can never be NULL. */ @@ -3436,7 +3418,7 @@ c_common_truthvalue_conversion (location_t location, tree expr) if (TREE_CODE (TREE_TYPE (expr)) == COMPLEX_TYPE) { - tree t = (in_late_binary_op ? save_expr (expr) : c_save_expr (expr)); + tree t = save_expr (expr); expr = (build_binary_op (EXPR_LOCATION (expr), (TREE_SIDE_EFFECTS (expr) diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h index 9e3982d..3981544 100644 --- a/gcc/c-family/c-common.h +++ b/gcc/c-family/c-common.h @@ -836,7 +836,6 @@ extern enum conversion_safety unsafe_conversion_p (location_t, tree, tree, extern bool decl_with_nonnull_addr_p (const_tree); extern tree c_fully_fold (tree, bool, bool *); extern tree c_wrap_maybe_const (tree, bool); -extern tree c_save_expr (tree); extern tree c_common_truthvalue_conversion (location_t, tree); extern void c_apply_type_quals_to_decl (int, tree); extern tree c_sizeof_or_alignof_type (location_t, tree, bool, bool, int); |