re PR middle-end/3074 (Statement with no effect not flagged with -Wall)
authorRoger Sayle <roger@eyesopen.com>
Thu, 20 May 2004 22:08:46 +0000 (22:08 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Thu, 20 May 2004 22:08:46 +0000 (22:08 +0000)
commitf4085d4c0b2c20282d8197507f6ffb35522aa2e6
tree9c22a0479f3c3304c61163c2b0ebb309c08513d1
parent3adf6cadbbfe23b96f8e53780ae5f1bc28f01077
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
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr3074-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/sequence-pt-1.c
gcc/tree.c
gcc/tree.h