On 08/23/10 09:36, Eric Blake wrote:
> gcc, where we know that the extension is supported, to make sure we
> don't introduce a future regression that could have been detected by gcc
> (and in case the AIX compiler is ever fixed).

Well, perhaps "gratuitous" was not the right word, but there is no need
for GCC to compile that code, as GCC doesn't have the bug in question.
GCC compiles that code only for software-engineering purposes, and
(as this discussion suggests) those purposes are not being well supported,
as the code has been buggy for years (-1 versus 0) and nobody has noticed.

Since the bug has not been detected for years,
I hope that the AIX bug has been fixed, and that nobody uses the old,
buggy AIX compilers any more, and that we can remove the test entirely
without anybody caring.  Perhaps that would be the simplest fix.  If I'm
wrong, we will discover that eventually, and we can reinstate the fix.
(I no longer have access to AIX compilers, so I can't test my guess.)

For reference, the discussion that reported the bugs is rooted here:
http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
This bug was reported against AIX 5.3, and IBM will continue to support
5.3 until next year (see 
<http://www.theregister.co.uk/2010/08/18/ibm_aix_7_1/>),
so perhaps someone who has access to an old 5.3 box can tell us whether
the bug still exists.  If the bug still exists, the following program
will fail on a 64-bit host:

#include <stdbool.h>
#include <assert.h>
int main (void) {
  char digs[10];
  assert (&(digs + 5)[-2 + (bool) 1] == &digs[4]);
  return 0;
}

Reply via email to