This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch] Fix PR46916/46902
- From: Mike Stump <mikestump at comcast dot net>
- To: IainS <developer at sandoe-acoustics dot co dot uk>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Mike Stump <mrs at gcc dot gnu dot org>
- Date: Fri, 17 Dec 2010 13:11:50 -0800
- Subject: Re: [Patch] Fix PR46916/46902
- References: <E00DD7AD-F729-425D-BFDE-950828D1C6D8@sandoe-acoustics.co.uk>
On Dec 17, 2010, at 1:55 AM, IainS <developer@sandoe-acoustics.co.uk> wrote:
> The two PRs turned out to be manifestations of the same issue.
>
> Basically,
> gcc/system.h redefines bool => unsigned char.
>
> this causes a conflict with any ABI where bool/_Bool is defined to something different (e.g. int).
>
> (I don't think PPC/Darwin is the only case where this was done... but it might be the only modern case).
>
> anyway the "gotcha" is that all {external} system headers _must_ be included before gcc/system.h (noted in that header).
I'll say what I said last time, this came up, but I'll be more blunt this round, this is totally wrong, it should either have it's own unique name (not bool), or it should use _Bool, everything else is wrong. That said, the below patch is in line with the current code's design, as awful as it is.
>