[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: Wed, 05 Oct 2005 15:31:58 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

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

> When this change is made, it runs just fine (well, it works for at least
> one input) after being compiled in 64-bit mode: 
> 1723c1723
> <       bool swap = (0 < compare (&lines[-1], &lines[-2]));
> ---
> >       int swap = (0 < compare (&lines[-1], &lines[-2]));

I guess bool is equivalent to unsigned int or unsigned long on that
platform We should figure out why that has happened and fix it.  C99
says that bool must promote to int, not to unsigned int, and I'd
rather not go through all the coreutils and other code looking for
other problems like this, if we can fix the real problem.

So I have a few questions, if you don't mind:

Can you please find out what type 'bool' is in that environment,
exactly?  Similarly for _Bool?

Does the file lib/stdbool.h exist on your host, or are you using
stdbool.h as supplied by your compiler?

Is the symbol __cplusplus defined?

Is HAVE__BOOL defined in config.h?

If you use 'cc -E' to preprocess the file (with all the other
arguments that are normally passed to cc), then what does the above
line look like, and what does the typedef for bool look like?

> Or report to IBM as an AIX compiler bug?

Perhaps it is a compiler bug -- if we know the answers to the above
questions we can probably illustrate it with a short example.

reply via email to

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