From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2408 invoked by alias); 2 Sep 2004 18:20:03 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 2386 invoked by uid 48); 2 Sep 2004 18:20:02 -0000 Date: Thu, 02 Sep 2004 18:20:00 -0000 Message-ID: <20040902182002.2385.qmail@sourceware.org> From: "trt at acm dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040630193304.16302.trt@acm.org> References: <20040630193304.16302.trt@acm.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug middle-end/16302] gcc fails to warn about some common logic errors X-Bugzilla-Reason: CC X-SW-Source: 2004-09/txt/msg00226.txt.bz2 List-Id: ------- Additional Comments From trt at acm dot org 2004-09-02 18:19 ------- Here are some reasons why I think this patch should be applied. 1. Inspection of the patch will show that it is "low risk", except for the potential risk of false positives. 2. I have been using this warning for about 4 years now, on a 35Mloc source code base involving 100s of developers, and it has triggered dozens of times with only a couple false positives. (The false positives do not happen with gcc 3.5, I think some changes to fold() have caused them to go away.) Sometimes, for fun, I use this compiler on other source code. E.g. I remember reporting two of these warnings (among others) in an early version of "valgrind". 3. It spots 3 bugs in gcc 3.5. One of them is fixed by this patch. If you want to see the other two, try applying the patch. As a downside, some versions of gcc/insn-attrtab.c trigger these warnings. Last I checked, the ia64 version had about 7 of them. They are technically valid, but probably indicate harmless inefficiencies. On the other hand, they might indicate something that should be cleaned up. I realize there is no urgent need for this patch, but I have seen much less effective (and sometimes counterproductive) warning messages added to gcc. Please consider one. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16302