|
From: | Avi Kivity |
Subject: | Re: [Qemu-devel] Re: [PATCH 2/5] CODING_STYLE: add C type rules |
Date: | Thu, 19 Aug 2010 11:12:16 +0300 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100720 Fedora/3.1.1-1.fc13 Thunderbird/3.1.1 |
On 08/19/2010 10:51 AM, Paolo Bonzini wrote:
_Bool can have values of 0 or 1, so all of the above should actually work.Yes, I'd like to rule those out even though they work, because I find them confusing. The compiler is smart enough to generate the same code in both cases.
One problem with coding styles is that people think they replace common sense. They don't, you shouldn't write ++x when you aren't counting even if there is no explicit rule in coding style forbidding it.
-- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.
[Prev in Thread] | Current Thread | [Next in Thread] |