Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!sri-unix!hplabs!tektronix!reed!nscpdc!joemu From: joemu@nscpdc.NSC.COM (Joe Mueller) Newsgroups: comp.lang.c,comp.std.internat Subject: Re: draft ANSI standard: one change that would *really* help Europe Message-ID: <783@nscpdc.NSC.COM> Date: Thu, 4-Dec-86 12:47:24 EST Article-I.D.: nscpdc.783 Posted: Thu Dec 4 12:47:24 1986 Date-Received: Sun, 7-Dec-86 20:45:20 EST References: <1382@hoptoad.uucp> <8322@lll-crg.ARpA> Organization: National Semiconductor, Portland Development Center, Portland, OR Lines: 41 Summary: Clarification of standard Xref: mnetor comp.lang.c:290 comp.std.internat:28 > >[We really need an 8-bit character set and C needs to acknowledge this] > > >[John thinks that perhaps "char" should be unsigned - most programs > would be more correct since they assUme that chars are unsigned] > > Well, I heartily agree, but I think that there must be some programs > out there that assume that chars are useful as small signed numbers, > which I would also prefer not to break. > > Also, I think that having chars have different semantics (assumed unsigned > rather than signed like int) would be a bad thing in general. Perhaps > what is needed is a "tiny" type (ala long and short) that would be signed > and (for now) essentially a signed char. > > Of course, this brings in yet another type (oh no!) and yet another > reserved word, but it would make programs nicer. > andy Andy, The standard does allow for a small signed char type called (would you believe) "signed char". From section 3.1.2.5 of the draft dated Oct. 1, 1986. A signed char occupies the same amount of storage as a "plain" char. A "plain" int has the natural size suggested by the architecture of the execution environment ... The committee wanted to "fix" the question of signedness of a char but couldn't arrive at an acceptable compromise. We thought about having chars be signed and unsigned chars unsigned but we were afraid it would break too much code that depended on chars being unsigned. We ended up adopting the compromise of: char - signed or unsigned, implementation defined unsigned char signed char By the way, the draft is now released for formal public review, so if you have any other technical comment, fire away now or it will be too late! a humble member of X3J11, Joe Mueller ...!nsc!nscpdc!joemu