🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1582

Re: Alignment (was: Structure Member Padding)

#1582
From: Doug Gwyn
Date: Fri, 10 Aug 1990 20:25
18 lines
1659 bytes
In article <904@hadron.COM> jsdy@hadron.UUCP (Joseph S. D. Yao) writes:
>I am sure that the ANSI standard has a reasonable definition of "byte",

The C standard defines "byte" and "char" as effectively synonymous;
although they have slightly different connotations, they occupy the
same space and "really" mean exactly the same thing.  There have to
be at least 8 bits in a char|byte, but it may be larger than that;
the implementor gets to decide on the exact size.  I suspect that
almost every implementation on machines that support direct
addressing of 8-bit bytes will make char|byte an 8-bit Yao-byte
(meaning: 8 contiguous bits).  The Yao definition for "byte" is what
I would consider correct for general usage, and it is consistent with
the usage in the C standard.  The notion that a byte has to be exactly
8 bits was probably due to the prevalence of 8-bit chunk-addressable
systems (System/360, PDP-11, Nova, VAX, 8080, 6800, ...) and to
ignorance of the existence of non-8-bit systems.  After all, 8 bits
is enough to represent any character with one bit left over for
parity, isn't it?  (Rhetorical question, the answer is "not really".)
Technical Details
Message-ID: <13529@smoke.BRL.MIL>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn
References: <25874@usc.edu> <1990Aug8.012908.28364@sq.sq.com> <904@hadron.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn
From: gwyn@smoke.BRL.MIL (Doug Gwyn)
Newsgroups: comp.std.c
Subject: Re: Alignment (was: Structure Member Padding)
Message-ID: <13529@smoke.BRL.MIL>
Date: 10 Aug 90 20:25:55 GMT
References: <25874@usc.edu> <1990Aug8.012908.28364@sq.sq.com> <904@hadron.COM>
Organization: U.S. Army Ballistic Research Laboratory, APG, MD.
Lines: 18