-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Ralf Wildenhues on 7/8/2008 2:57 PM:
| This is odd. I can confirm it though: bcc ("Bruce’s C compiler")
| doesn't throw a compile error for
|
| static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= 1)];
| test_array[0] = 0;
|
| I do get a compile error with
|
| int
| main ()
| {
| static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= 1)];
| return sizeof test_array;
|
|
| so I'm wondering whether we should change the test. Changing
| AC_LANG_BOOL_COMPILE_TRY(C) in a way so that it doesn't ever
| warn (thus getting _AC_COMPUTE_INT_COMPILE to silently return
| bogus results), isn't completely trivial, though
| (unreachable code vs. code that is optimized away).
What about a combination of approaches?
static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= 1)];
return sizeof test_array - (test_array[0] = 0);
- --
Don't work too hard, make some time for fun as well!
Eric Blake [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkiZpPcACgkQ84KuGfSFAYCn3gCeKUVpdJlTQvlGEYOTYZoTK/KM
P+AAn0bLEtiv10ebEKJNg8An3wMUZglz
=3aM4
-----END PGP SIGNATURE-----
_______________________________________________
Autoconf mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/autoconf