"Lemley James - jlemle" <[EMAIL PROTECTED]> writes: > this detects it: > > #include <stdbool.h> > #include <stdio.h> > char *c = NULL; > int main() > { return &(c + 5)[-2 + (bool) 1] == &c[4] ? 0 : 1; }
Thanks. We might use that if that's the best we can do, but I want something that works at compile-time, so that cross-compilation works. How about this program instead? It should fail to compile with the buggy AIX compiler, but it should compile successfully with non-buggy compilers. #include <stdbool.h> char c[] = "0123456789"; int x = 1 / (&(c + 5)[-2 + (bool) 1] == &c[4]); int main() { return !c || !x; } _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils