This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/16302] gcc fails to warn about some common logic errors


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]