Long Chars

00704a-Liber nevin1 at ihlpf.ATT.COM
Thu Mar 31 11:24:51 AEST 1988


In article <7586 at brl-smoke.ARPA> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:

>The problem with preempting "char" for small objects is that most C
>code thinks that a "char" is big enough to hold a primitive unit of
>text.  This is plainly wrong in some environments unless "char" is
>made pretty large.

C code *should* think that a "char" is big enough to hold a primitive unit
of text.  That's because K&R (1st edition) said (section 4, paragraph 4 of
the C reference manual):

"Objects declared as characters (char) are large enough to store any member
of the implementation's character set, ..."

Currently (pre-dpANS), if this is not true, then the language being
implemented is not K&R C (although, I'll admit, it's probably pretty close
:-)).


I do agree with you that right now "char" has too many uses and there is no
easy way to separate them due to the volume of existing code that uses
"char"s in different ways (assuming that I am not mis-paraphrasing you; if
I am, I'm sorry).
-- 
 _ __			NEVIN J. LIBER	..!ihnp4!ihlpf!nevin1	(312) 510-6194
' )  )				"The secret compartment of my ring I fill
 /  / _ , __o  ____		 with an Underdog super-energy pill."
/  (_</_\/ <__/ / <_	These are solely MY opinions, not AT&T's, blah blah blah



More information about the Comp.lang.c mailing list