This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Workaround more _Bool problems on HP-UX


On Sun, 25 Jan 2004, Kaveh R. Ghazi wrote:
> I was originally going to test HAVE__BOOL, but based on Dave's reply
> in thread, I limited BOOL_BITFIELD to gcc3 or later.  This patch
> survived mainline C,C++ bootstrap on sparc-sun-solaris2.7 using
> gcc2.95 for stage1 to test the non-_Bool case.
>
> Roger, does it fix the hpux problem?

Its missing the important bit, you've left the following code

>> #ifdef HAVE_STDBOOL_H
>> # include <stdbool.h>
>> #else
>> # if !HAVE__BOOL
>> typedef char _Bool;
>> # endif
>> # define bool _Bool
>> # define true 1
>> # define false 0
>> #endif

unchanged, so we still end up using _Bool when we shouldn't.
It's changing this to "#define bool unsigned char" that leads
to the bit-field warnings/errors that then required the
elimination of "bool foo : 1" and your BOOL_BITFIELD fixes.

On its own your patch fails in the same place.  I'm trying the
obvious hybrid (incorporating my changes to the above lines from
system.h) now.  Apart from that your patch looks good.

Thanks,

Roger
--


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]