/cp
2019-11-20 Paolo Carlini <paolo.carlini@oracle.com>
* cvt.c (ocp_convert): Use additional warning sentinel.
/testsuite
2019-11-20 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/warn/multiple-sign-compare-warn-1.C: New.
From-SVN: r278475
+2019-11-20 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * cvt.c (ocp_convert): Use additional warning sentinel.
+
2019-11-19 Jakub Jelinek <jakub@redhat.com>
PR c++/92414
/* Prevent bogus -Wint-in-bool-context warnings coming
from c_common_truthvalue_conversion down the line. */
warning_sentinel w (warn_int_in_bool_context);
+ warning_sentinel c (warn_sign_compare);
return cp_truthvalue_conversion (e, complain);
}
}
+2019-11-20 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * g++.dg/warn/multiple-sign-compare-warn-1.C: New.
+
2019-11-20 Joseph Myers <joseph@codesourcery.com>
* gcc.dg/c2x-attr-deprecated-2.c, gcc.dg/c2x-attr-fallthrough-2.c,
--- /dev/null
+// { dg-options "-Wsign-compare" }
+
+int foo()
+{
+ unsigned char b = '1';
+
+ bool x = ~b; // { dg-bogus "promoted bitwise complement of an unsigned value is always nonzero.*promoted bitwise complement of an unsigned value is always nonzero" }
+ // { dg-warning "promoted bitwise complement of an unsigned value is always nonzero" "" { target *-*-* } .-1 }
+
+ return 0;
+}