[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 09:59:58 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

"Lemley James - jlemle" <address@hidden> writes:

> The problem isn't with bool or _Bool; the problem reproduces with char
> and unsigned char as well.

I kind of expected that with unsigned char.  If char is unsigned on
your host (is it?) I would expect it with char as well.

> Moreover, the assert won't catch it. 

So, the problem occurs only in a subscript context?  I really would
like to catch it if possible.

Does the following program catch it?  I'll looking for a way to detect
that compiler bug at compile-time.

   #include <stdbool.h>
   char c[] = "0123456789";
   char f[&(c + 5)[-2 + (bool) 1] == &c[4] ? 1 : -1];
   int main() { return !c || !f; }

> Summary:  don't do anything to sort.c or friends; this is a compiler
> problem.

Even so, we'd like coreutils to work fine on your system.  If it's a
compiler bug that others have we don't want them to go through what
you've gone through.  Are you using an experimental or a mainstream
version of the compiler?  Maybe I was too hasty in backing out the
sort.c change.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]