1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
extern void abort (); int f(int x) { return (x >> (sizeof (x) * __CHAR_BIT__ - 1)) ? -1 : 1; } volatile int one = 1; int main (void) { /* Test that the function above returns different values for different signs. */ if (f(one) == f(-one)) abort (); return 0; }