Article View: net.lang.c
Article #9745Re: sizeof(char)
From: Kim Chr. Madsen
Date: Thu, 06 Nov 1986 16:03
Date: Thu, 06 Nov 1986 16:03
24 lines
1743 bytes
1743 bytes
In article <5141@brl-smoke.ARPA>, gwyn@brl-smoke.ARPA (Doug Gwyn ) writes: ] ] X3J11 as it stands requires sizeof(char)==1. I have proposed that ] this requirement be removed, to better support applications such as ] Asian character sets and bitmap display programming. Along with ] this, I proposed a new data type such that sizeof(short char)==1. ] It turns out that the current draft proposed standard has to be ] changed very little to support this distinction between character ] objects (char) and smallest-addressable objects (short char). This ] is much better, I think, than a proposal that introduced (long char) ] for text characters. ] ] Unfortunately, much existing C code believes that "char" means "byte". ] My proposal would allow implementors the freedom to decide whether ] supporting this existing practice is more important than the benefits Why not take the full step and let the datatype char be of variable size, like int's and other types. Then invent the datatype ``byte'' which is exactly 8 bits long. Do I hear you say it would break existing C-code, well so would the introduction of ``short char''.... <Kim Chr. Madsen>
Technical Details
Message-ID:
<126@olamb.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!seismo!mcvax!diku!olamb!kimcmReferences:
<4617@brl-smoke.ARPA> <657@dg_rtp.UUCP> <55@cartan.Berkeley.EDU> <5141@brl-smoke.ARPA>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!seismo!mcvax!diku!olamb!kimcm From: kimcm@olamb.UUCP (Kim Chr. Madsen) Newsgroups: net.lang.c Subject: Re: sizeof(char) Message-ID: <126@olamb.UUCP> Date: Thu, 6-Nov-86 11:03:01 EST Article-I.D.: olamb.126 Posted: Thu Nov 6 11:03:01 1986 Date-Received: Fri, 7-Nov-86 22:06:22 EST References: <4617@brl-smoke.ARPA> <657@dg_rtp.UUCP> <55@cartan.Berkeley.EDU> <5141@brl-smoke.ARPA> Organization: AmbraSoft A/S (Denmark) Lines: 24 Summary: short char ???