This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Workaround more _Bool problems on HP-UX
- From: Roger Sayle <roger at eyesopen dot com>
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Cc: rth at redhat dot com, <dave at hiauly1 dot hia dot nrc dot ca>, <gcc-patches at gcc dot gnu dot org>, <zack at codesourcery dot com>
- Date: Sun, 25 Jan 2004 19:30:30 -0700 (MST)
- Subject: 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
--