[Bug c/82437] [8 Regression] false-positive -Wtautological-compare warning with -std=gnu89
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82437 Jakub Jelinek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #6 from Jakub Jelinek --- Fixed.
[Bug c/82437] [8 Regression] false-positive -Wtautological-compare warning with -std=gnu89
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82437 --- Comment #5 from Jakub Jelinek --- Author: jakub Date: Tue Oct 10 16:17:47 2017 New Revision: 253589 URL: https://gcc.gnu.org/viewcvs?rev=253589=gcc=rev Log: PR c/82437 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide instead of wide_int::from. * c-c++-common/Wtautological-compare-7.c: New test. Added: trunk/gcc/testsuite/c-c++-common/Wtautological-compare-7.c Modified: trunk/gcc/c-family/ChangeLog trunk/gcc/c-family/c-warn.c trunk/gcc/testsuite/ChangeLog
[Bug c/82437] [8 Regression] false-positive -Wtautological-compare warning with -std=gnu89
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82437 --- Comment #4 from Jakub Jelinek --- Author: jakub Date: Fri Oct 6 07:11:25 2017 New Revision: 253476 URL: https://gcc.gnu.org/viewcvs?rev=253476=gcc=rev Log: PR c/82437 * c-warn.c (warn_tautological_bitwise_comparison): Instead of using to_widest use wide_int with the larger of the two precisions. * c-c++-common/Wtautological-compare-6.c: New test. Added: trunk/gcc/testsuite/c-c++-common/Wtautological-compare-6.c Modified: trunk/gcc/c-family/ChangeLog trunk/gcc/c-family/c-warn.c trunk/gcc/testsuite/ChangeLog
[Bug c/82437] [8 Regression] false-positive -Wtautological-compare warning with -std=gnu89
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82437 --- Comment #3 from Arnd Bergmann --- (In reply to Jakub Jelinek from comment #2) > Untested fix. This appears to address all instances of the problem for me, thanks!
[Bug c/82437] [8 Regression] false-positive -Wtautological-compare warning with -std=gnu89
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82437 --- Comment #2 from Jakub Jelinek --- Created attachment 42309 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42309=edit gcc8-pr82437.patch Untested fix.
[Bug c/82437] [8 Regression] false-positive -Wtautological-compare warning with -std=gnu89
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82437 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2017-10-05 CC||jakub at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org Target Milestone|--- |8.0 Summary|false-positive |[8 Regression] |-Wtautological-compare |false-positive |warning with -std=gnu89 |-Wtautological-compare ||warning with -std=gnu89 Ever confirmed|0 |1 --- Comment #1 from Jakub Jelinek --- The problem is that warn_tautological_cmp is called on the original arguments, not yet converted to the common type. So one of them is negative, the other positive.