🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1577

Re: Alignment (was: Structure Member Padding)

#1577
From: Joseph S. D. Yao
Date: Thu, 09 Aug 1990 21:11
32 lines
1984 bytes
In article <1990Aug8.012908.28364@sq.sq.com> msb@sq.sq.com (Mark Brader) writes:
>1.6 says that any object is a contiguous sequence of bytes, each of which
>is individually addressable.  3.3.3.4 forces the size of type char to be
>exactly 1 byte.  

...

>I can't take "contiguously allocated" to mean anything else but that
>the object declared by "char y[4];" occupies exactly 4 bytes, which have
>consecutive addresses; sizeof y must be 4.

In recent years, for some reason, people have been assuming that "byte"
means "eight bits" (bit = binary unit of information).  The more
general definition that I learned at the beginning of my introduction
to computers was that it was a group of [contiguous] bits.  This was
reinforced by the existence of byte-handling instructions on machines
like the now-venerable PDP-10 and its successors.  For these instruc-
tions, one had to specify not only a byte address, but also a starting
bit and a size (0-36).

I am sure that the ANSI standard has a reasonable definition of "byte",
probably the one that Doug gave ... from where I'm sitting, I just
can't see a copy of it ...

	Joe Yao				jsdy@hadron.COM
	( jsdy%hadron.COM@{uunet.UU.NET,decuac.DEC.COM} )
	arc,arinc,att,avatar,blkcat,cos,decuac,\
	dtix,ecogong,grebyn,inco,insight,kcwc,  \
	lepton,lsw,netex,netxcom,phw5,research,  >!hadron!jsdy
	rlgvax,seismo,sms,smsdpg,sundc,telenet, /
	uunet				       /
(Last I counted ...)
Technical Details
Message-ID: <904@hadron.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!sdd.hp.com!decwrl!bacchus.pa.dec.com!decuac!hadron!jsdy
References: <1990Jul7.225141.12002@sq.sq.com> <13321@smoke.BRL.MIL> <25874@usc.edu> <1990Aug8.012908.28364@sq.sq.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!sdd.hp.com!decwrl!bacchus.pa.dec.com!decuac!hadron!jsdy
From: jsdy@hadron.COM (Joseph S. D. Yao)
Newsgroups: comp.std.c
Subject: Re: Alignment (was: Structure Member Padding)
Message-ID: <904@hadron.COM>
Date: 9 Aug 90 21:11:51 GMT
References: <1990Jul7.225141.12002@sq.sq.com> <13321@smoke.BRL.MIL> <25874@usc.edu> <1990Aug8.012908.28364@sq.sq.com>
Reply-To: jsdy@hadron.UUCP (Joseph S. D. Yao)
Organization: Hadron, Inc., Fairfax, VA
Lines: 32