From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=54289 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OleTh-00074A-3K for qemu-devel@nongnu.org; Wed, 18 Aug 2010 04:58:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OleTg-0001Cp-3K for qemu-devel@nongnu.org; Wed, 18 Aug 2010 04:58:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48794) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OleTf-0001CY-Rp for qemu-devel@nongnu.org; Wed, 18 Aug 2010 04:58:32 -0400 Message-ID: <4C6BA0B2.1030400@redhat.com> Date: Wed, 18 Aug 2010 10:58:26 +0200 From: Jes Sorensen MIME-Version: 1.0 References: <4C6A43B5.40809@redhat.com> <4C6AD744.1070009@twiddle.net> <4C6B9B44.7020803@redhat.com> In-Reply-To: <4C6B9B44.7020803@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 2/5] CODING_STYLE: add C type rules List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Blue Swirl , qemu-devel , Richard Henderson On 08/18/10 10:35, Paolo Bonzini wrote: > On 08/17/2010 08:39 PM, Richard Henderson wrote: >>> I'd strongly discourage the use of bool in any code. >> >> 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 think "bool" is fine, but it should be either stdbool.h or a typedef. > Using stdbool.h only when it is present is going to introduce bugs the > day someone relies on the magic properties of the C99 bool. This is exactly the problem, it doesn't buy us anything, except for #ifdef chaos. We're better off sticking to int, then we know what we have and avoiding this mess. Jes