From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 8520 invoked from network); 6 Jun 2022 00:36:14 -0000 Received: from tb-ob1.topicbox.com (64.147.108.173) by inbox.vuxu.org with ESMTPUTF8; 6 Jun 2022 00:36:14 -0000 Received: from tb-mx0.topicbox.com (tb-mx0.nyi.icgroup.com [10.90.30.73]) by tb-ob1.topicbox.com (Postfix) with ESMTP id 906131C4B1 for ; Sun, 5 Jun 2022 20:36:12 -0400 (EDT) (envelope-from bounce.mMda3d0c619c734bb0e1cf708c.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx0.topicbox.com (Postfix, from userid 1132) id 8BC5F26B38BB; Sun, 5 Jun 2022 20:36:12 -0400 (EDT) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=none (no signatures found); dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=none,d=none,d.eval=none) policy.policy-from=p header.from=sdf.org; spf=pass smtp.mailfrom=adr@SDF.ORG smtp.helo=mx.sdf.org; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=date:from:to:message-id:mime-version :content-type:list-help:list-id:list-post:list-subscribe :reply-to:subject:content-transfer-encoding:list-unsubscribe; s= sysmsg-1; t=1654475772; bh=+pM6TEHuNDl+eFotd5LMghAd4yS7OZdRPhwRe PymdFk=; b=HzZQx3RPlH4RWm9tn9yUWRPuSAu+6U4v/DQGxE1QoLCl36Xx0ZT5O ZqFypUbPX7Qwnk/vXEGBeyUn5vO8kuF5LFq1xc04CcYFz6Tu7lxQogr0vIVx+fbF CMBmUVUdcvbsfmzUDaaNw8/mdMdqxAwXK/tLbxcitbVO7FsZGRvkDI= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1654475772; b=TTR+NDsFdU6n8W2C4YBmofdX73wMNtJLcwbLDO1VH5FpYKufDl kwyLZgUiZZf0ihcsXtDH6gRbYN5Vuw5mgEVEUOshU39UTh7a9A9osxcTkDAsVV7v MRPmE1mioKHq41OdPYlXqTCYCX8r5myhLgJVPLifmBzoGz3ZK2zRJuPSA= Authentication-Results: topicbox.com; arc=pass; dkim=none (no signatures found); dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=none,d=none,d.eval=none) policy.policy-from=p header.from=sdf.org; spf=pass smtp.mailfrom=adr@SDF.ORG smtp.helo=mx.sdf.org; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) X-Received-Authentication-Results: tb-mx0.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=none (no signatures found); dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=none,d=none,d.eval=none) policy.policy-from=p header.from=sdf.org; iprev=pass smtp.remote-ip=205.166.94.24 (mx.sdf.org); spf=pass smtp.mailfrom=adr@SDF.ORG smtp.helo=mx.sdf.org; x-aligned-from=pass (Address match); x-me-sender=none; x-ptr=pass smtp.helo=mx.sdf.org policy.ptr=mx.sdf.org; x-return-mx=pass header.domain=sdf.org policy.is_org=yes (MX Records found: mx.sdf.org); x-return-mx=pass smtp.domain=sdf.org policy.is_org=yes (MX Records found: mx.sdf.org); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h=date:from :to:message-id:mime-version:content-type:list-help:list-id :list-post:list-subscribe:reply-to:subject :content-transfer-encoding:list-unsubscribe; s=dkim-1; t= 1654475772; x=1654562172; bh=0aT9kBpnOkI60CgKL+BfTaZ8kqwXi6RTqFs oaB6mdig=; b=jjgk4teD3tyPlomGRDEXcqeeuBtjGHniizD2fmpERvfN824Oprp xI2hsAHbl9wPPWtYzln9gsyfgUmr3b2O4osHojtQFqz5UDBwjnUvxm0j1NqIs/V2 isFcr/sJj937HZe1icY56k5rPXZpMa6fzImr5TM9FMjAh/YAtd6v5PFE= Received: from tb-mx0.topicbox.com (localhost.local [127.0.0.1]) by tb-mx0.topicbox.com (Postfix) with ESMTP id BFD1E26B34A3 for <9fans@9fans.net>; Sun, 5 Jun 2022 20:35:50 -0400 (EDT) (envelope-from adr@SDF.ORG) Received: from tb-mx0.topicbox.com (localhost [127.0.0.1]) by tb-mx0.topicbox.com (Authentication Milter) with ESMTP id 6C0CAD93E7E; Sun, 5 Jun 2022 20:35:50 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1654475750; b=QxtfkkZKlzJN8lTIhlws2vWreXVK21MWVgH+Nna7pDy3sttfJT z8+Obn/cdnrXnD0FnUbL9Ag4ul+kTQYlyW51ERh25pI36WN6NG+HePArhXt+zqeP rppTkX5wZEfGSz2Yz2Ag0Dbfhn+vhlG/9dXIQg89AoVGFfpU06m38+F6tIMJ1NDO bZTjy7Vz72LwnIm6KNOgUrrgn3HpYjTM3hN+Y9b8zVsvnqIwTuMFpxWhuoLgeo5l 5aVKJel6nHLm2nc951HXl/28sYq9fDY0ScebAjzfnwZRO9ONAlT/Nch6ZcMAK8FF H5TzWc7S2RjRD/07ix5Riwh918dYSfzjBtlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=date:from:to:subject:message-id:mime-version :content-type; s=arcseal; t=1654475750; bh=xSOS8FF9hAnuW2U/t0Nid Vae8xUjTs9ZzZGDIeuNFD4=; b=BNal9Q0JGrYUeTznXPHDN+69HNaQ7LU7ROQCS lME5CF28XHfmP05NhpyhQP9pStH0iAr1l6nMQEp3YQHad+wq5VN/V6lXlufgN9PZ X8J2tvDjw2AN/58JvBOUo69ExKh42U5Z1GgDuXrtALe9/tDdvBhvK6dPqBiVUGDS bVU64Oe1VXTUL2UBkKiTBmdjhEDdNOhtBGHALBlMpI3CcvcuImdfy/nag4UbwlVd KeooeKI1YMHKsEzakUQ9lgQ7MvJlwMLCxWGSTZtZ7dPIzj2OQTSG90lg+2Af3lpE TEg7CtjRYdX729sc1Br5uIycLpgSXNLDWpFYtzGT5KDDJhdxw== ARC-Authentication-Results: i=1; tb-mx0.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=none (no signatures found); dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=none,d=none,d.eval=none) policy.policy-from=p header.from=sdf.org; iprev=pass smtp.remote-ip=205.166.94.24 (mx.sdf.org); spf=pass smtp.mailfrom=adr@SDF.ORG smtp.helo=mx.sdf.org; x-aligned-from=pass (Address match); x-me-sender=none; x-ptr=pass smtp.helo=mx.sdf.org policy.ptr=mx.sdf.org; x-return-mx=pass header.domain=sdf.org policy.is_org=yes (MX Records found: mx.sdf.org); x-return-mx=pass smtp.domain=sdf.org policy.is_org=yes (MX Records found: mx.sdf.org); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgedvfedruddtuddgfeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuf fkgggtsehttdertddttddvnecuhfhrohhmpegrughruceorggurhesufffhfdrqfftifeq necuggftrfgrthhtvghrnhepvddtieelffevteevleelleeuhfeutdehvdfhjedvfeduhe eukeelhfeigfetveeinecukfhppedvtdehrdduieeirdelgedrvdegpddvtdehrdduieei rdelgedrudeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvd dthedrudeiiedrleegrddvgedphhgvlhhopehmgidrshgufhdrohhrghdpmhgrihhlfhhr ohhmpeeorggurhesufffhfdrqfftifeq X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (sdf.org: 205.166.94.24 is authorized to use 'adr@SDF.ORG' in 'mfrom' identity (mechanism 'ip4:205.166.94.0/24' matched)) receiver=tb-mx0.topicbox.com; identity=mailfrom; envelope-from="adr@SDF.ORG"; helo=mx.sdf.org; client-ip=205.166.94.24 Received: from mx.sdf.org (mx.sdf.org [205.166.94.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx0.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Sun, 5 Jun 2022 20:35:49 -0400 (EDT) (envelope-from adr@SDF.ORG) Received: from sdf.org (IDENT:adr@sdf.org [205.166.94.16]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 2560Zl5p016292 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO) for <9fans@9fans.net>; Mon, 6 Jun 2022 00:35:48 GMT Received: from localhost (adr@localhost) by sdf.org (8.15.2/8.12.8/Submit) with ESMTP id 2560Zl8m001996 for <9fans@9fans.net>; Mon, 6 Jun 2022 00:35:47 GMT Date: Mon, 6 Jun 2022 00:35:47 +0000 (UTC) From: adr To: 9fans@9fans.net Message-ID: <3df37b2-6a4a-fdfb-7bec-218471d6cb8@SDF.ORG> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: a0949a04-e530-11ec-98ec-801eddfcaf99 Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UNGJjZWQ1ODA5NzFhNDBhMi1NZGEzZDBjNjE5YzczNGJiMGUxY2Y3?= =?UTF-8?B?MDhjPg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> Subject: [9fans] Conversion of constants in C compiler Content-Transfer-Encoding: quoted-printable List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:Mda3d0c619c734bb0e1cf708c:1:4MLuTXtjuGkxzuBT-8N2OKeAQTWS4PbbYoNi7IGOIvQ Building cmd I noticed that the case of sizeof(int) =3D sizeof(long) (which is the case in all compilers) wasn't managed with my changes. I wonder if this logic mess could be shortened without making impossible to read the 'if' conditions without throwing up (I've tried). I've compiled on arm the libraries, cmd and kernel (except ape) without any problem. adr. /sys/src/cmd/cc/lex.c [...] vv =3D yylval.vval; if(c1 & Numvlong || (uvlong)convvtox(vv, TUVLONG) > convvtox(vv, TULONG)){ /* unsigned suffix or hex occupying the sing bit */ if((c1 & Numuns) || convvtox(vv, TVLONG) < 0 && (c1 & Numde= c) =3D=3D 0) { c =3D LUVLCONST; t =3D TUVLONG; goto nret; } c =3D LVLCONST; t =3D TVLONG; goto nret; } if(c1 & Numlong || (uvlong)convvtox(vv, TULONG) > convvtox(vv, TUINT)){ if((c1 & Numuns) || convvtox(vv, TLONG) < 0 && (c1 & Numdec= ) =3D=3D 0) { c =3D LULCONST; t =3D TULONG; goto nret; } /* decimal occupying the sing bit */ if(convvtox(vv, TLONG) < 0 && (c1 & Numdec)) { c =3D LVLCONST; t =3D TVLONG; goto nret; } c =3D LLCONST; t =3D TLONG; goto nret; } if((c1 & Numuns) || convvtox(vv, TINT) < 0 && (c1 & Numdec) =3D=3D = 0) { c =3D LUCONST; t =3D TUINT; goto nret; } if(convvtox(vv, TINT) < 0 && (c1 & Numdec)) { /* size(int) =3D size(long) */ if(convvtox(vv, TLONG) < 0) { c =3D LVLCONST; t =3D TVLONG; goto nret; } c =3D LLCONST; t =3D TLONG; goto nret; } c =3D LCONST; t =3D TINT; goto nret; [...] ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T4bced580971a40a2-Mda3d0= c619c734bb0e1cf708c Delivery options: https://9fans.topicbox.com/groups/9fans/subscription