[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/5] CODING_STYLE: add C type rules

From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH 2/5] CODING_STYLE: add C type rules
Date: Thu, 19 Aug 2010 11:10:28 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100720 Fedora/3.1.1-1.fc13 Thunderbird/3.1.1

 On 08/19/2010 10:58 AM, Jes Sorensen wrote:

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.

Neither do int, short, long, long long, or signed short long float.

Most processors, at least
the ones I have programmed, tend to treat it as zero == false,
everything else == true.

Processors don't have _Bool.

For structure packing it's ugly.

Use uint*_t for externally visible structures. use _Bool for internal booleans.

I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]