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: [RFC PATCH]: Define "bool" as _Bool when bootstrapping with gcc >= 4.4


On Tue, Sep 21, 2010 at 9:23 PM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Uros" == Uros Bizjak <ubizjak@gmail.com> writes:
>
> Andrew> I think one issue is that libcpp needs to make sure it has the same
> Andrew> definition for bool also.
>
> Uros> Hm, indeed. I have started bootstrap on x86_64-pc-linux-gnu with the
> Uros> attached patch (that copies relevant parts of gcc/system.h to
> Uros> libgcc/system.h).
>
> Uros> ?/* Provide a fake boolean type. ?We make no attempt to use the
> Uros> ? ? C99 _Bool, as it may not be available in the bootstrap compiler,
> Uros> - ? and even if it is, it is liable to be buggy.
> Uros> + ? and even if it is, it is liable to be buggy.
>
> This comment needs to be updated to reflect the new reality.

Thanks - perhaps something like following text:

<quote>
/* Only use C99 _Bool with GCC.  Otherwise, provide a fake boolean type, as
   _Bool may not be available in the bootstrap compiler, and even if it is,
   it is liable to be buggy.

   This must be defined after all inclusion of system headers, as some of
   them will mess us up.  */
</quote>

> I didn't read the patch too closely this time around, but the idea seems
> reasonable to me.

Uros.


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