From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=38546 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Om0BJ-00009W-Nm for qemu-devel@nongnu.org; Thu, 19 Aug 2010 04:09:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Om00x-0000s9-Kb for qemu-devel@nongnu.org; Thu, 19 Aug 2010 03:58:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53399) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Om00x-0000ry-AV for qemu-devel@nongnu.org; Thu, 19 Aug 2010 03:58:19 -0400 Message-ID: <4C6CE416.1050902@redhat.com> Date: Thu, 19 Aug 2010 09:58:14 +0200 From: Jes Sorensen MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 2/5] CODING_STYLE: add C type rules References: <4C6A43B5.40809@redhat.com> <4C6AD744.1070009@twiddle.net> <4C6ADFED.5020703@redhat.com> <4C6C0E4D.6040607@redhat.com> In-Reply-To: <4C6C0E4D.6040607@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Blue Swirl , qemu-devel , Richard Henderson 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