On 08/18/10 10:35, Paolo Bonzini wrote:
> On 08/17/2010 08:39 PM, Richard Henderson wrote:
>>>  I'd strongly discourage the use of bool in any code.
>>
>> I strongly disagree.  The use of "bool", even if you ignore stdbool.h
>> and do "typedef int bool", is valuable documentation in the code.
> 
> I think "bool" is fine, but it should be either stdbool.h or a typedef.
>  Using stdbool.h only when it is present is going to introduce bugs the
> day someone relies on the magic properties of the C99 bool.

This is exactly the problem, it doesn't buy us anything, except for
#ifdef chaos. We're better off sticking to int, then we know what we
have and avoiding this mess.

Jes

Reply via email to