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_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 25974 invoked from network); 20 Apr 2022 11:38:51 -0000 Received: from tb-ob20.topicbox.com (173.228.157.66) by inbox.vuxu.org with ESMTPUTF8; 20 Apr 2022 11:38:51 -0000 Received: from tb-mx0.topicbox.com (tb-mx0.nyi.icgroup.com [10.90.30.73]) by tb-ob20.topicbox.com (Postfix) with ESMTP id BBB7A3783A for ; Wed, 20 Apr 2022 07:38:49 -0400 (EDT) (envelope-from bounce.mM9c8aea84ddf712920e17bc0e.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx0.topicbox.com (Postfix, from userid 1132) id 68D6C4AEBAB9; Wed, 20 Apr 2022 07:38:49 -0400 (EDT) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=e3oAnKi5 header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; spf=pass smtp.mailfrom=charles.forsyth@gmail.com smtp.helo=mail-ej1-f47.google.com; 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=mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type:list-help:list-id:list-post :list-subscribe:reply-to:content-transfer-encoding :list-unsubscribe; s=sysmsg-1; t=1650454729; bh=UhLm4ZefWLQtfEYn G3G/nphTCTLpZPh84K2ID+YWsQU=; b=IFdeZzsk5DMvQ62/fGOOHm+X0SrOkwro Tmppf+Bpob8xrZXWJGpZt1tcTf+Xgzlbw6u3uh9jbIl0PycYsG5TU5cJhcPsIe/+ RpQQ1t+JMxvlr6+g5WCLOefpI3wretlGo40fA3+rURxNvZrd139TkCwf0yLl3ylg EDXrb3pGV5A= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1650454729; b=W81zZqR5b9jRN+Kvwa13xlthsYwlN6OzJP/V74WCh+25Iv2Omk wEQ8dLsAS3iUnm6aWdNoyJHZdLt/WrqebAIqDNK+tgNk86OKHfOVjH5id1XAbXET /KK1dwUKgIMKSS1rwJsNFNhTivqAQ8dyVFeCzGkOKb+jQ5eEX9mwQ5fU8= Authentication-Results: topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=e3oAnKi5 header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; spf=pass smtp.mailfrom=charles.forsyth@gmail.com smtp.helo=mail-ej1-f47.google.com; 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-mx1.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=e3oAnKi5 header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; iprev=pass smtp.remote-ip=209.85.218.47 (mail-ej1-f47.google.com); spf=pass smtp.mailfrom=charles.forsyth@gmail.com smtp.helo=mail-ej1-f47.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=NZBEEzPB; x-me-sender=none; x-ptr=pass smtp.helo=mail-ej1-f47.google.com policy.ptr=mail-ej1-f47.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: alt4.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt4.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com); 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= mime-version:references:in-reply-to:from:date:message-id:subject :to:content-type:list-help:list-id:list-post:list-subscribe :reply-to:content-transfer-encoding:list-unsubscribe; s=dkim-1; bh=6Pi+ifyXN/RFl9xl8IhlxmCH9lV+nfG0fE+ThepCfcg=; b=dl5H9rHA/C+r pu3nDGeNBU70JcniVjNpymLv2lLmLC2MFJm6KN/teUFHcC5xsfnlzN2XHIi3EkTl NALaeEi+FOwSNDeckQuW9TJpX6vkfcdbUom1PSw6POgwnKKBQnrZpN0MK9CTMJ7U P8s7X4czLa/vVwAUiOCbYNnXo3FzoTU= Received: from tb-mx1.topicbox.com (localhost.local [127.0.0.1]) by tb-mx1.topicbox.com (Postfix) with ESMTP id F2E9A139E959 for <9fans@9fans.net>; Wed, 20 Apr 2022 07:38:29 -0400 (EDT) (envelope-from charles.forsyth@gmail.com) Received: from tb-mx1.topicbox.com (localhost [127.0.0.1]) by tb-mx1.topicbox.com (Authentication Milter) with ESMTP id 575938DB00D; Wed, 20 Apr 2022 07:38:29 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1650454709; b=o8KuwcULsyo0D3qBQbOjWlrDGYSBoSwnE4jvOYIhu3j4aVSnNB VLQVr62WjDa9OziDkEB+1GBi2b971+bSor0sMmgi7/ilj1koZNJTUkjIcTALV7kC BcHC5dG56pYN0+0BW235juKXDwhXgc/lb89kRAGA7RH9QSvDY6y90waSpT8hXYX/ lO0LlcpwFOv6gpX6zJ9EGULsbLRJ52glzyt5+/0LCnyPjLNd0wEV+SMA4GYsPcxF QsF55XCzIUYVZAv6s+o9kv8nmu6t3T6kdadHjmpmC3UTX7DlIwjbAS1O3eN6iIc0 zezEfczBAV4XmuHdEXC8ZLdgmrqLypFtPzwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type; s=arcseal; t=1650454709; bh=wTrBKdyt358exs2u2mVMKaEw2PbEZw0p4RZEQP9yuEs=; b=D9lkPXyEBpcy pKho4Xr4jrzP+RGqPxzxoaQsmXkCv7Ho9ZqLwYFWPgvnaO4tegYsTbdhwG5qKsym wQhcPVpVELhXW+mOPbw49f4gmtfqbDlj7Qq8NiAY2BEkvJE2quS1AJ9GqH4hqSTc AlnedjAZpXNtKQrtx2ST37dNpr7GoVZMGiaH2Hsu5m8HrhEL1vxFzlQvsvTqDQ3X wosoN8D97AVAibpXmlIrDUUFpHhvDJITzBEgybA9mDkdkhdjgGbgs2wgstqX3AZq AAuOVjrLtLpW0plJTDjwApMpeHcybDyLIuMKc6AcyXIPkkQWQBPLimRoUoiBbIav JMJYVGA3YQ== ARC-Authentication-Results: i=1; tb-mx1.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=e3oAnKi5 header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; iprev=pass smtp.remote-ip=209.85.218.47 (mail-ej1-f47.google.com); spf=pass smtp.mailfrom=charles.forsyth@gmail.com smtp.helo=mail-ej1-f47.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=NZBEEzPB; x-me-sender=none; x-ptr=pass smtp.helo=mail-ej1-f47.google.com policy.ptr=mail-ej1-f47.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: alt4.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt4.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com); 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: gggruggvucftvghtrhhoucdtuddrgedvvddrvddtvddgfedtucdltddurdegudehrddttd dmucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgf nhhsuhgsshgtrhhisggvpdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttd enucenucfjughrpeggfhgjhfffkffuvfgtsegrtderredttdejnecuhfhrohhmpeevhhgr rhhlvghsucfhohhrshihthhhuceotghhrghrlhgvshdrfhhorhhshihthhesghhmrghilh drtghomheqnecuggftrfgrthhtvghrnhepfeetgeekveekiedtleetieefgfehfeduuedt gfdufeevtefhveefveeiveehheevnecukfhppedvtdelrdekhedrvddukedrgeejnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvddtledrkeehrddvudek rdegjedphhgvlhhopehmrghilhdqvghjuddqfhegjedrghhoohhglhgvrdgtohhmpdhmrg hilhhfrhhomhepoegthhgrrhhlvghsrdhfohhrshihthhhsehgmhgrihhlrdgtohhmqe X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (gmail.com ... _spf.google.com: Sender is authorized to use 'charles.forsyth@gmail.com' in 'mfrom' identity (mechanism 'include:_netblocks.google.com' matched)) receiver=tb-mx1.topicbox.com; identity=mailfrom; envelope-from="charles.forsyth@gmail.com"; helo=mail-ej1-f47.google.com; client-ip=209.85.218.47 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx1.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Wed, 20 Apr 2022 07:38:29 -0400 (EDT) (envelope-from charles.forsyth@gmail.com) Received: by mail-ej1-f47.google.com with SMTP id bv19so2914919ejb.6 for <9fans@9fans.net>; Wed, 20 Apr 2022 04:38:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=wTrBKdyt358exs2u2mVMKaEw2PbEZw0p4RZEQP9yuEs=; b=NZBEEzPBLt2Lk83sFeibvX0vh/Nv0XYU4/0MpGwIBZNmKp7sl+TVR6Mryt3xyVX79W NqXxkRKxPIF6H7aHswHwfWYaDU00Xn43zaltS3FE4fJWB1lPkRlsRN0saaM7H8qfN487 m2LtWED1/TlAyTElhfL1kSA5osWJTPHbLUm5ZeKvYHk8kD/zYijt4I7fdifFyYahCPUj eBAXeX3I0z9IrXdiveiGMTlWk88B6cWNnBYJlfPNGYdVv9OVGOSemado6K5P12DTw5sJ syAgK2QYxcU2tIZ4IZuF5VTfyOHIZLSCbEmyqHVrmp8p+rlazMRgp8f+v9dB3vAC5ptU unTw== X-Gm-Message-State: AOAM532krPkodb6JFLM8oRSkuQsUd5po886FFGf8/HeIbe9zCVcVczY4 8+5JB2xeeOhaW0NlohxbZhawbxA0Xc9bUESSPZ5t+F7sqXM= X-Google-Smtp-Source: ABdhPJwLoDY9tKkj3Ds4Vc8fzr2f7jlIA1VpjJEmHK1tteKZjDfGNTEFHbbr55JNmEJkNeIBSBx5PsyiFx4ceZuFz2g= X-Received: by 2002:a17:906:af7b:b0:6e8:8123:78ab with SMTP id os27-20020a170906af7b00b006e8812378abmr17563364ejb.434.1650454707340; Wed, 20 Apr 2022 04:38:27 -0700 (PDT) MIME-Version: 1.0 References: <16a447c9-e11-c379-598-7430d2ed39d4@SDF.ORG> In-Reply-To: <16a447c9-e11-c379-598-7430d2ed39d4@SDF.ORG> From: Charles Forsyth Date: Wed, 20 Apr 2022 12:38:15 +0100 Message-ID: Subject: Re: [9fans] Conversion of constants in C compiler To: 9fans <9fans@9fans.net> Content-Type: multipart/alternative; boundary=0000000000008c918b05dd146e5c Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: 695f7254-c09e-11ec-93fa-e2751eede0ef Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UMjI3NTRmMTBiMjQxOTkxYy1NOWM4YWVhODRkZGY3MTI5MjBlMTdi?= =?UTF-8?B?YzBlPg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> Content-Transfer-Encoding: 7bit List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:M9c8aea84ddf712920e17bc0e:1:inWZuc7WJGWzXuYZdnac44TY6owmbG9YjjiLlTSXcOI --0000000000008c918b05dd146e5c Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable The short answer is whatever the historical reasons for the current interpretation(s), it should follow C99 rules to avoid confusion. One potential catch is that the compilers don't implement C99 rules when signed and unsigned values meet, but something closer to the original convention (which frankly was simpler) that the result (or comparison) is unsigned, portably, regardless of word size. I suspect things will break if that is changed, although again using the C99 rule is probably less confusing in the end, because both people and new incoming programs will expect the C99 interpretation. ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T22754f10b241991c-M9c8ae= a84ddf712920e17bc0e Delivery options: https://9fans.topicbox.com/groups/9fans/subscription --0000000000008c918b05dd146e5c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
The short answer is whatever the historical re= asons for the current interpretation(s), it should follow C99 rules to avoi= d confusion.
One potential catch is that the compilers don't implem= ent C99 rules when signed and unsigned values meet, but something closer to= the original convention
(which frankly was simpler) that the res= ult (or comparison) is unsigned, portably, regardless of word size. I suspe= ct things will break if that is changed,
although again using the= C99 rule is probably less confusing in the end, because both people a= nd new incoming programs will expect the C99 interpretation.
= --0000000000008c918b05dd146e5c--