4646 |
int |
int |
4647 |
main (void) |
main (void) |
4648 |
@{ |
@{ |
4649 |
static int test_array [(unsigned long) (sizeof (int)) == 4 ? 1 : -1]; |
static int test_array [sizeof (int) == 4 ? 1 : -1]; |
4650 |
test_array [0] = 0 |
test_array [0] = 0 |
4651 |
return 0; |
return 0; |
4652 |
@} |
@} |
4662 |
cc: "conftest.c": error 1879: Variable-length arrays cannot \ |
cc: "conftest.c": error 1879: Variable-length arrays cannot \ |
4663 |
have static storage. |
have static storage. |
4664 |
@end example |
@end example |
4665 |
|
|
4666 |
|
Autoconf works around this problem by casting @code{sizeof (int)} to |
4667 |
|
@code{long} before comparing it. |
4668 |
@end table |
@end table |
4669 |
|
|
4670 |
@node Generic Compiler Characteristics |
@node Generic Compiler Characteristics |