This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/3074] Statement with no effect not flagged with -Wall
- From: "cvs-commit at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 May 2004 22:08:58 -0000
- Subject: [Bug middle-end/3074] Statement with no effect not flagged with -Wall
- References: <20010607075601.3074.fritz@intrinsity.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-05-20 22:08 -------
Subject: Bug 3074
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: sayle@gcc.gnu.org 2004-05-20 22:08:46
Modified files:
gcc : ChangeLog fold-const.c tree.c tree.h
gcc/testsuite : ChangeLog
gcc/testsuite/gcc.dg: sequence-pt-1.c
Added files:
gcc/testsuite/gcc.dg: pr3074-1.c
Log message:
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.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3713&r2=2.3714
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fold-const.c.diff?cvsroot=gcc&r1=1.377&r2=1.378
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree.c.diff?cvsroot=gcc&r1=1.371&r2=1.372
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree.h.diff?cvsroot=gcc&r1=1.496&r2=1.497
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3764&r2=1.3765
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr3074-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/sequence-pt-1.c.diff?cvsroot=gcc&r1=1.7&r2=1.8
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3074