On Sun, 22 Aug 2010, Anders Kaseorg wrote: > - int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); > + int xlcbug = 1 / (&((char *)0 + 5)[-2 + (bool) 1] == &((char *)0)[4] ? > 1 : -1);
Oh, actually, in order for this to actually test anything (other than the initializer extension), the -1 should always have been a 0: diff --git a/lib/autoconf/headers.m4 b/lib/autoconf/headers.m4 index c8d34c0..8a7a549 100644 --- a/lib/autoconf/headers.m4 +++ b/lib/autoconf/headers.m4 @@ -655,8 +655,7 @@ AC_DEFUN([AC_HEADER_STDBOOL], this with GCC, where it should work, to detect more quickly whether someone messes up the test in the future. */ - char digs[] = "0123456789"; - int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); + int xlcbug = 1 / (&((char *)0 + 5)[-2 + (bool) 1] == &((char *)0)[4] ? 1 : 0); # endif /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html Anders