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=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 18313 invoked from network); 16 May 2020 00:34:18 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 16 May 2020 00:34:18 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id E5EC89C6CF; Sat, 16 May 2020 10:34:16 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 5C6C09C668; Sat, 16 May 2020 10:34:05 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id 56B619C668; Sat, 16 May 2020 10:34:03 +1000 (AEST) X-Greylist: delayed 355 seconds by postgrey-1.36 at minnie.tuhs.org; Sat, 16 May 2020 10:34:02 AEST Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) by minnie.tuhs.org (Postfix) with ESMTPS id A40FF9C62E for ; Sat, 16 May 2020 10:34:02 +1000 (AEST) Received: by sdaoden.eu (Postfix, from userid 1000) id F25B416054; Sat, 16 May 2020 02:28:05 +0200 (CEST) Date: Sat, 16 May 2020 02:28:05 +0200 From: Steffen Nurpmeso To: "Nelson H. F. Beebe" Message-ID: <20200516002805.NJgvh%steffen@sdaoden.eu> In-Reply-To: References: Mail-Followup-To: "Nelson H. F. Beebe" , tuhs@minnie.tuhs.org User-Agent: s-nail v14.9.19-42-g6235a28f OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. Subject: Re: [TUHS] v7 K&R C X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tuhs@minnie.tuhs.org Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" Nelson H. F. Beebe wrote in : |Discussions today on the TUHS list about the signed/unsigned nature of |the C char type led me to reexamine logs of my feature test package at | | http://www.math.utah.edu/pub/features/ | |I had 170 build logs for it from 2017.11.07, so I moved those aside |and ran another set of builds in our current enlarged test farm. That |generated another 361 fresh builds. Those tests are all with the C |compiler named "cc". I did not explore what other C compilers did, |but I strongly suspect that they all agree on any single platform. | |On all but THREE systems, the tests report that "char" is signed, with |CHAR_MAX == +127. | |The three outliers have char unsigned with CHAR_MAX == +255, and are | | * ARM armv7l Linux 4.13.1 (2017) and 5.6.7 (2020) | * SGI O2 R10000-SC (150 MHz) IRIX 6.5 (2017 and 2020) | * IBM POWER8 CentOS Linux release 7.4.1708 (AltArch) (2017) | |So, while the ISO C Standards, and historical practice, leave it |implementation dependent whether char is signed or unsigned, there is |a strong majority for a signed type. Just to note Linus Torvalds "famous" "It better had been unsigned, Virginia". --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)