[TUHS] v7 K&R C

Nelson H. F. Beebe beebe at math.utah.edu
Sat May 16 10:15:29 AEST 2020

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


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 at math.utah.edu  -
- 155 S 1400 E RM 233                       beebe at acm.org  beebe at computer.org -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -

More information about the TUHS mailing list