draft ANSI standard: are chars signed?

Joe Mueller joemu at nscpdc.NSC.COM
Thu Dec 18 04:27:44 AEST 1986


In article <1462 at hoptoad.uucp>, gnu at hoptoad.uucp (John Gilmore) writes:
> > We ended up adopting the compromise of:
> > 	char	- signed or unsigned, implementation defined
> 
> Of course, this compromise breaks all the code that depends on chars
> being EITHER signed OR unsigned!  To be portable and "strictly
> conforming", you can't depend on =chars having signs= or =chars having no
> signs=, you just can't depend.
> 
> I would rather they had broken half the code that makes assumptions,
> rather than all of it.


You missed the point. The position the committee took doesn't break any code.
It's just not maximally portable (strictly conforming). This code has never been
portable to all systems. If you want to make this code more portable, you will
have to add "signed" or "unsigned" to all of your char declarations to get the
range you really want. If we had made all chars signed, it would have truely
broken all the code that depended on it being unsigned.

							Joe Mueller
							...!nsc!nscpdc!joemu



More information about the Comp.lang.c mailing list