This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Minor work-around for native HPPA compiler bug
- From: "Zack Weinberg" <zack at codesourcery dot com>
- To: "Joseph S. Myers" <jsm at polyomino dot org dot uk>
- Cc: Roger Sayle <roger at eyesopen dot com>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 02 Jan 2004 11:04:54 -0800
- Subject: Re: [PATCH] Minor work-around for native HPPA compiler bug
- References: <Pine.LNX.4.44.0312302112110.9360-100000@www.eyesopen.com><87brpofwnu.fsf@egil.codesourcery.com><Pine.LNX.4.58.0312312236080.27752@digraph.polyomino.org.uk><873cb0ftpt.fsf@egil.codesourcery.com><Pine.LNX.4.58.0312312341500.21230@digraph.polyomino.org.uk>
"Joseph S. Myers" <jsm@polyomino.org.uk> writes:
> On Wed, 31 Dec 2003, Zack Weinberg wrote:
>
>> > There's a case for doing the opposite - ignoring <stdbool.h> and just
>> > defining bool, true, false (using _Bool if available, or else char) - to
>> > avoid the ABI problem people have had in the past with bootstrapping with
>> > 2.95.x (bool has different sizes in stage1 (from the enum in 2.95's
>> > <stdbool.h>) and later stages, causing problems if changes in development
>> > and recompilation mean files built with different compilers get linked
>> > together). At least the test could be made to reject 2.95's <stdbool.h>.
>>
>> Hmm, good point, would you mind revising the patch?
>
> Which direction did you want to go in - a configure test that rejects
> 2.95's <stdbool.h> (or maybe only allows a working C99 <stdbool.h>, by
> testing e.g. that (bool)2 == 1), or ignoring <stdbool.h> altogether (as in
> the old untested patch <http://gcc.gnu.org/ml/gcc/2002-09/msg00797.html>)?
I think ignoring stdbool.h is the way to go - commentary in system.h
about why it isn't being used would be good, though. I don't like the
idea of testing for a working C99 <stdbool.h> because that would
require an AC_TRY_RUN test, and also because GCC's own code cannot
count on the C99 properties of _Bool, such as the one in your
example. (We don't have a good way to enforce not relying on that; I
would appreciate any ideas you might have.)
zw