From patchwork Mon Nov 14 20:50:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 9428345 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8D094602F0 for ; Mon, 14 Nov 2016 20:50:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CFBB28AE3 for ; Mon, 14 Nov 2016 20:50:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6FF6B28AE6; Mon, 14 Nov 2016 20:50:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F61428AE3 for ; Mon, 14 Nov 2016 20:50:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934591AbcKNUup (ORCPT ); Mon, 14 Nov 2016 15:50:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34214 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932515AbcKNUup (ORCPT ); Mon, 14 Nov 2016 15:50:45 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A0E313F755 for ; Mon, 14 Nov 2016 20:50:44 +0000 (UTC) Received: from tleilax.poochiereds.net (ovpn-116-49.rdu2.redhat.com [10.10.116.49]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uAEKoiIr029416 for ; Mon, 14 Nov 2016 15:50:44 -0500 From: Jeff Layton To: linux-sparse@vger.kernel.org Subject: [RFC PATCH] bits_in_bool should be 8 Date: Mon, 14 Nov 2016 15:50:43 -0500 Message-Id: <1479156643-28563-1-git-send-email-jlayton@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 14 Nov 2016 20:50:44 +0000 (UTC) Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Given that we're working with byte-addressable machines, each type must be at least one byte in size or you'd not be able to take a pointer to it. Noticed at random when I ran the sample "compile" program in the sparse source tree vs. a test C program that uses bools. It crashes without this patch. Signed-off-by: Jeff Layton --- target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target.c b/target.c index 17b228ae924c..6a535bc0b2d7 100644 --- a/target.c +++ b/target.c @@ -14,7 +14,7 @@ int max_alignment = 16; /* * Integer data types */ -int bits_in_bool = 1; +int bits_in_bool = 8; int bits_in_char = 8; int bits_in_short = 16; int bits_in_int = 32;