+2017-10-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/82437
+ * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
+ instead of wide_int::from.
+
2017-10-06 Jakub Jelinek <jakub@redhat.com>
PR c/82437
int prec = MAX (TYPE_PRECISION (TREE_TYPE (cst)),
TYPE_PRECISION (TREE_TYPE (bitopcst)));
- wide_int bitopcstw = wide_int::from (bitopcst, prec, UNSIGNED);
- wide_int cstw = wide_int::from (cst, prec, UNSIGNED);
+ wide_int bitopcstw = wi::to_wide (bitopcst, prec);
+ wide_int cstw = wi::to_wide (cst, prec);
wide_int res;
if (TREE_CODE (bitop) == BIT_AND_EXPR)
+2017-10-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/82437
+ * c-c++-common/Wtautological-compare-7.c: New test.
+
2017-10-10 Bin Cheng <bin.cheng@arm.com>
* gcc.dg/tree-ssa/ldist-34.c: New test.
--- /dev/null
+/* PR c/82437 */
+/* { dg-do compile { target int32 } } */
+/* { dg-options "-Wtautological-compare" } */
+
+int
+foo (unsigned long long int x)
+{
+ if ((x | 0x190000000ULL) != -1879048192) /* { dg-bogus "bitwise comparison always evaluates to" } */
+ return 0;
+ return 1;
+}