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] Minor work-around for native HPPA compiler bug


"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


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