Some compilers exhibit different behaviors.
static int test_array[sizeof (int) == 4 ? 1 : -1];
To our knowledge, there is a single compiler that does not support this
trick: the HP C compilers (the real ones, not only the
“bundled”) on HP-UX 11.00.
They incorrectly reject the above program with the diagnostic
“Variable-length arrays cannot have static storage.”
This bug comes from HP compilers' mishandling of sizeof (int)
,
not from the ? 1 : -1
, and
Autoconf works around this problem by casting sizeof (int)
to
long int
before comparing it.