2018-04-09 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / compare10.c
blob3b8af28bf188ba10390984bbe0667852210087a8
1 /* Test for bogus -Wsign-compare warnings that appeared when not
2 folding operands before warning. */
3 /* { dg-do compile } */
4 /* { dg-options "-Wsign-compare" } */
6 int
7 test_compare (int a, unsigned b)
9 return (b > 8 * (a ? 4 : 8));
12 unsigned int
13 test_conditional (int a, unsigned b, int c)
15 return (c ? b : 8 * (a ? 4 : 8));