S/390: Deprecate g5 and g6 CPU levels
[official-gcc.git] / gcc / testsuite / g++.dg / warn / Wsign-compare-5.C
blob641c49972ee49de44ec04f09ca4540ed3147ef7a
1 // Test that -Wsign-compare doesn't warn about
2 // equality/non-equality comparisons with sizeof.
3 // { dg-do compile }
4 // { dg-options "-Wsign-compare" }
6 int
7 foo (int x)
9   if (x != sizeof (sizeof (x)))         // { dg-bogus "comparison between signed and unsigned integer expressions" }
10     return 1;
11   return 0;
14 int
15 bar (int x)
17   if (x == sizeof (sizeof (x)) + 1)     // { dg-bogus "comparison between signed and unsigned integer expressions" }
18     return 1;
19   return 0;