blob: 7c9ff24bc83b98bbf8a5abe9100473b45ddbe076 [file] [log] [blame]
/* PR c/107465 */
/* { dg-do compile } */
/* { dg-options "-Wsign-compare" } */
void baz (void);
typedef unsigned short T;
#if __SIZEOF_SHORT__ * __CHAR_BIT__ == 16
void
foo (unsigned short x)
{
if (!(x ^ 0xFFFF))
baz ();
}
void
bar (T x)
{
if (!(x ^ 0xFFFF)) /* { dg-bogus "promoted bitwise complement of an unsigned value is always nonzero" } */
baz ();
}
#endif