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 17161 invoked from network); 16 May 2020 00:23:12 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 16 May 2020 00:23:12 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id DC93D9C978; Sat, 16 May 2020 10:23:08 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 62AB49C668; Sat, 16 May 2020 10:22:42 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id 049799C668; Sat, 16 May 2020 10:22:39 +1000 (AEST) X-Greylist: delayed 426 seconds by postgrey-1.36 at minnie.tuhs.org; Sat, 16 May 2020 10:22:36 AEST Received: from ipo8.cc.utah.edu (ipo8.cc.utah.edu [155.97.144.47]) by minnie.tuhs.org (Postfix) with ESMTPS id 4C7979C62E for ; Sat, 16 May 2020 10:22:36 +1000 (AEST) IronPort-SDR: cvY2pew7ZwDr2dYWi6wovvKYsHqxbWB/UFaXNXn/45AKH/ibZ6ryDOCpYfS5QGLIcqKH+XRdGb O8tU6YrX7T6wuPDeW5N72+2pf/SLaw0u/Du6lGRXzaFkcm/9WfnrOqPSo7A3NbFukLCry/V4M7 m8uslSuSF38GL8YSGUKAVo75Yejl/kKRH6IiCJg+4Dmr6yxAdSIrGR+0ZZmDl3w/oszqMRj5GE zOM/qzvV7HCxowuo0meBWWv8/AzWiisYJ4InTIQbPTHEX6ZIjxEaY9SU2aeaS4nB/E6wFZF46c Or8= X-IronPort-AV: E=Sophos;i="5.73,397,1583218800"; d="scan'208";a="245298534" Received: from mail.math.utah.edu ([155.101.98.135]) by ipo8smtp.cc.utah.edu with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 15 May 2020 18:15:29 -0600 Received: from gamma.math.utah.edu (gamma.math.utah.edu [155.101.96.20]) by mail.math.utah.edu (8.14.8/8.14.8) with ESMTP id 04G0FTrp009859; Fri, 15 May 2020 18:15:29 -0600 (MDT) Received: from gamma.math.utah.edu (localhost [127.0.0.1]) by gamma.math.utah.edu (8.15.1/8.15.1) with ESMTP id 04G0FTpr027273; Fri, 15 May 2020 18:15:29 -0600 Received: (from beebe@localhost) by gamma.math.utah.edu (8.15.1/8.15.1/Submit) id 04G0FT1V027272; Fri, 15 May 2020 18:15:29 -0600 Date: Fri, 15 May 2020 18:15:29 -0600 From: "Nelson H. F. Beebe" To: tuhs@minnie.tuhs.org X-US-Mail: "Department of Mathematics, 110 LCB, University of Utah, 155 S 1400 E RM 233, Salt Lake City, UT 84112-0090, USA" X-Telephone: +1 801 581 5254 X-FAX: +1 801 581 4148 X-URL: http://www.math.utah.edu/~beebe Message-ID: X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.8 (mail.math.utah.edu [155.101.98.135]); Fri, 15 May 2020 18:15:29 -0600 (MDT) 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: , Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" 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. ------------------------------------------------------------------------------- - Nelson H. F. Beebe Tel: +1 801 581 5254 - - University of Utah FAX: +1 801 581 4148 - - Department of Mathematics, 110 LCB Internet e-mail: beebe@math.utah.edu - - 155 S 1400 E RM 233 beebe@acm.org beebe@computer.org - - Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe/ - -------------------------------------------------------------------------------