1 /* { dg-do compile } */
2 /* { dg-options "-Wsign-compare" } */
3
4 int
f(unsigned short a1,unsigned short a2,unsigned int b)5 f(unsigned short a1, unsigned short a2, unsigned int b)
6 {
7 return ((a1+a2)|5) > b ? 2 : 3; /* { dg-bogus "signed and unsigned" } */
8 }
9
10 int
g(unsigned short a1,unsigned short a2,unsigned int b)11 g(unsigned short a1, unsigned short a2, unsigned int b)
12 {
13 return ((a1+a2)&5) > b ? 2 : 3; /* { dg-bogus "signed and unsigned" } */
14 }
15
16 int
h(unsigned short a1,unsigned short a2,unsigned int b)17 h(unsigned short a1, unsigned short a2, unsigned int b)
18 {
19 return ((a1+a2)^5) > b ? 2 : 3; /* { dg-bogus "signed and unsigned" } */
20 }
21
22