This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/49234] [4.6/4.7/4.8 Regression] -Wstrict-overflow gives obviously unwarranted warning
- From: "ian at airs dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 06 Mar 2013 16:18:50 +0000
- Subject: [Bug tree-optimization/49234] [4.6/4.7/4.8 Regression] -Wstrict-overflow gives obviously unwarranted warning
- Auto-submitted: auto-generated
- References: <bug-49234-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49234
--- Comment #19 from Ian Lance Taylor <ian at airs dot com> 2013-03-06 16:18:50 UTC ---
Those tests are more or less the whole point of the strict-overflow warning.
-Wstrict-overflow exists to have an optional warning that tells you when you
may run into trouble. For a warning of this type it's much better to have a
false positive than a false negative. A false positive is just annoying. A
false negative causes you to miss a potential bug in the program.
Sorry you've put so much time into this, but I don't see how it could be
acceptable to have a false negative on a case like Wstrict-overflow-12.c.