PR c/64856
[official-gcc.git] / gcc / testsuite / gcc.dg / compare8.c
blobd723c45a0956ce641ade9a27961ede16d3813de2
1 /* { dg-do compile } */
2 /* { dg-options "-Wsign-compare" } */
4 int
5 f(unsigned short a1, unsigned short a2, unsigned int b)
7 return ((a1+a2)|5) > b ? 2 : 3; /* { dg-bogus "signed and unsigned" } */
10 int
11 g(unsigned short a1, unsigned short a2, unsigned int b)
13 return ((a1+a2)&5) > b ? 2 : 3; /* { dg-bogus "signed and unsigned" } */
16 int
17 h(unsigned short a1, unsigned short a2, unsigned int b)
19 return ((a1+a2)^5) > b ? 2 : 3; /* { dg-bogus "signed and unsigned" } */