[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug report: sort.c or AIX compiler
From: |
Paul Eggert |
Subject: |
Re: Bug report: sort.c or AIX compiler |
Date: |
Thu, 06 Oct 2005 13:06:26 -0700 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
"Lemley James - jlemle" <address@hidden> 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; }
- Re: Bug report: sort.c or AIX compiler, (continued)
RE: Bug report: sort.c or AIX compiler, Lemley James - jlemle, 2005/10/05
RE: Bug report: sort.c or AIX compiler, Lemley James - jlemle, 2005/10/06
RE: Bug report: sort.c or AIX compiler, Lemley James - jlemle, 2005/10/06
- Re: Bug report: sort.c or AIX compiler,
Paul Eggert <=
RE: Bug report: sort.c or AIX compiler, Lemley James - jlemle, 2005/10/06