On 08/18/10 18:46, Avi Kivity wrote: > On 08/17/2010 10:15 PM, Jes Sorensen wrote: >> >>> 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 guess we have to agree to disagree then. IMHO it just masks the real >> type and you end up with cases where people pass it back and forth >> randomly. > > In C99, bool is a real type.
Kinda real, I would qualify it more as a pseudo type. It doesn't map to any register size or even instruction actions. Most processors, at least the ones I have programmed, tend to treat it as zero == false, everything else == true. For structure packing it's ugly. Jes