aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2004-05-20 22:08:46 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2004-05-20 22:08:46 +0000
commitf4085d4c0b2c20282d8197507f6ffb35522aa2e6 (patch)
tree9c22a0479f3c3304c61163c2b0ebb309c08513d1 /gcc/tree.c
parent3adf6cadbbfe23b96f8e53780ae5f1bc28f01077 (diff)
downloadgcc-f4085d4c0b2c20282d8197507f6ffb35522aa2e6.zip
gcc-f4085d4c0b2c20282d8197507f6ffb35522aa2e6.tar.gz
gcc-f4085d4c0b2c20282d8197507f6ffb35522aa2e6.tar.bz2
re PR middle-end/3074 (Statement with no effect not flagged with -Wall)
PR middle-end/3074 * fold-const.c (strip_compound_expr): Delete function. (count_cond): Delete function. (fold_binary_op_with_conditional_arg): Only perform transformations "a + (b?c:d) -> b ? a+c : a+d" and "(b?c:d) + a -> b ? c+a : d+a" when a is constant. This greatly simplifies this routine. * tree.c (saved_expr_p): Delete function. * tree.h (saved_expr_p): Delete function prototype. * gcc.dg/pr3074-1.c: New test case. * gcc.dg/sequence-pt-1.c: Remove an XFAIL. From-SVN: r82071
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 791cc22..2d1513c 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -1432,15 +1432,6 @@ skip_simple_arithmetic (tree expr)
return inner;
}
-/* Return TRUE if EXPR is a SAVE_EXPR or wraps simple arithmetic around a
- SAVE_EXPR. Return FALSE otherwise. */
-
-bool
-saved_expr_p (tree expr)
-{
- return TREE_CODE (skip_simple_arithmetic (expr)) == SAVE_EXPR;
-}
-
/* Arrange for an expression to be expanded multiple independent
times. This is useful for cleanup actions, as the backend can
expand them multiple times in different places. */