[PATCH] Revert "llvm-c/lto.h: Avoid use of bool."

Reid Kleckner rnk at google.com
Thu Oct 24 13:45:04 PDT 2013


On Thu, Oct 24, 2013 at 1:35 PM, Chandler Carruth <chandlerc at google.com>wrote:

>
> On Thu, Oct 24, 2013 at 1:33 PM, Reid Kleckner <rnk at google.com> wrote:
>
>> +#   define bool unsigned char
>
>
> In what way is it *ever* safe to #define 'bool' in a C header file. I
> don't get it. Why can't we use C types in the C interface?
>

Er, if it's a C89 compiler (MSVC), bool isn't really reserved for the
implementation now, is it?

This interface is supposed to be stable.  On Linux we've used the C99 _Bool
type and C++ bool type interchangeably and we need to keep doing so.

Are you suggesting I invent a new lto_bool_t typedef which is bool when
available and a same-sized C type on Windows, and then apply that
everywhere?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131024/1d808c92/attachment.html>


More information about the llvm-commits mailing list