From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=51660 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Om0Ec-0001Li-7e for qemu-devel@nongnu.org; Thu, 19 Aug 2010 04:12:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Om0EY-0003Gq-3B for qemu-devel@nongnu.org; Thu, 19 Aug 2010 04:12:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61346) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Om0EX-0003Gk-P2 for qemu-devel@nongnu.org; Thu, 19 Aug 2010 04:12:22 -0400 Message-ID: <4C6CE760.8060909@redhat.com> Date: Thu, 19 Aug 2010 11:12:16 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH 2/5] CODING_STYLE: add C type rules References: <4C6A43B5.40809@redhat.com> <4C6AD744.1070009@twiddle.net> <4C6B9B44.7020803@redhat.com> <4C6BB642.4000205@redhat.com> <4C6BE6E1.9010108@redhat.com> <4C6C1072.1000200@redhat.com> <4C6CE292.7090404@redhat.com> In-Reply-To: <4C6CE292.7090404@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Kevin Wolf , Blue Swirl , qemu-devel@nongnu.org, Jes Sorensen 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.