From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA23FC433E0 for ; Wed, 27 Jan 2021 14:33:33 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 85723207C4 for ; Wed, 27 Jan 2021 14:33:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 85723207C4 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.76119.137223 (Exim 4.92) (envelope-from ) id 1l4lsm-0004Cx-Ml; Wed, 27 Jan 2021 14:33:20 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 76119.137223; Wed, 27 Jan 2021 14:33:20 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l4lsm-0004Cq-Jv; Wed, 27 Jan 2021 14:33:20 +0000 Received: by outflank-mailman (input) for mailman id 76119; Wed, 27 Jan 2021 14:33:19 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l4lsl-0004Cl-8C for xen-devel@lists.xenproject.org; Wed, 27 Jan 2021 14:33:19 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id f6e74d7d-f311-4eb7-b643-77ed12d5dcb6; Wed, 27 Jan 2021 14:33:18 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 9D7AEAC4F; Wed, 27 Jan 2021 14:33:17 +0000 (UTC) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: f6e74d7d-f311-4eb7-b643-77ed12d5dcb6 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1611757997; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oOUJXZcQg5gZ4Ls42YaQpYRnn4yb1sSfHaMowy6CMVE=; b=JEATmqIFeMCzBix+X50HP5Ou4xq3dof4F1hsLjdVy0hM5tTLNAxp2f/1zsa4vHKBukiD8d J2UlQvN+EI4iI2xTNJ/2aEn24wMg7MX+rUnnZrYwMN60JAZ8fDMlMxVJdA60fM/QapIAKf ewJ3fkawDKKkrtV3qKHa7GIyrKhDTU0= Subject: Re: [PATCH] Fix error: array subscript has type 'char' [and 1 more messages] To: Ian Jackson Cc: Wei Liu , Anthony PERARD , Andrew Cooper , George Dunlap , Julien Grall , Stefano Stabellini , xen-devel@lists.xenproject.org, Manuel Bouyer References: <20210112181242.1570-1-bouyer@antioche.eu.org> <574d9ed8-c827-6864-4732-4e1b813fc3e3@suse.com> <20210114122912.GA2522@antioche.eu.org> <1af2b532-4dce-29cf-94ae-ad0c399ecbce@suse.com> <20210114141615.GA9157@mail.soc.lip6.fr> <20210126174415.GA21858@mail.soc.lip6.fr> <24592.22685.67161.585056@mariner.uk.xensource.com> <2452d5cb-90ba-a4c4-a5e4-3070c5a676d2@suse.com> <27ec4834-ebf2-2121-47f7-470083d03a3f@suse.com> <24593.28738.216430.891500@mariner.uk.xensource.com> From: Jan Beulich Message-ID: Date: Wed, 27 Jan 2021 15:33:17 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <24593.28738.216430.891500@mariner.uk.xensource.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 27.01.2021 14:53, Ian Jackson wrote: > Jan Beulich writes ("Re: [PATCH] Fix error: array subscript has type 'char'"): >> On 27.01.2021 09:31, Jan Beulich wrote: >>> But yes, I'm not the maintainer of this code, so if you're >>> happy with such risks, so be it. >> >> And actually I was only partly right here - there's one hunk >> here affecting code I'm the maintainer just as much as you >> are. At least there I'd like to ask that ... >> >>> For the record, to me the less risky approach here would seem >>> to have been to make use of compilers allowing to choose >>> whether plain char is signed or unsigned, and force it to >>> unsigned for at least the affected components. >> >> ... this be considered as an alternative, before I maybe >> withdraw my de-facto nak. > > Whether char is signed or unsigned is generally specified in the > platform API/ABI. Deviating from this for userland code is not > possible or reasonable since it would involve processing the system > headers with a deviant langauge definition! I don't think I've ever come across that part of a platform API/ABI spec. Instead my understanding so far was that good platform headers would be ignorant of the user's choice of char's signed-ness (wherever compilers offer such a choice, but I think all that I've ever worked with did). At the very least gcc's doc doesn't warn about any possible incompatibilities resulting from use of -fsigned-char or -funsigned-char (or their bitfield equivalents, for that matter). Jan