🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #20568

Re: Sorting struct members for alignment (was Re: Unaligned Accesses)

#20568
From: Guy Harris
Date: Tue, 28 Mar 1989 18:13
11 lines
1058 bytes
>In C, it has been a very common idiom to ASSUME that the address of the first
>member of a struct IS the address of the struct.

Well, according to the December 7, 1988 ANSI C draft, it's not an
assumption, it's a fact:

	3.5.2.1 Structure and union specifiers

	...A pointer to a structure object, suitably converted, points
	to its initial member (or if that member is a bit-field, then to
	the unit in which it resides), and vice versa. ...
Technical Details
Message-ID: <1315@auspex.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!auspex!guy
References: <37196@bbn.COM> <1989Mar16.190043.23227@utzoo.uucp> <24889@amdcad.AMD.COM> <355@bnr-fos.UUCP> <13@microsoft.UUCP> <362@bnr-fos.UUCP> <59@microsoft.UUCP> <11118@pur-ee.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!auspex!guy
From: guy@auspex.UUCP (Guy Harris)
Newsgroups: comp.arch
Subject: Re: Sorting struct members for alignment (was Re: Unaligned Accesses)
Keywords: alignment
Message-ID: <1315@auspex.UUCP>
Date: 28 Mar 89 18:13:48 GMT
References: <37196@bbn.COM> <1989Mar16.190043.23227@utzoo.uucp> <24889@amdcad.AMD.COM> <355@bnr-fos.UUCP> <13@microsoft.UUCP> <362@bnr-fos.UUCP> <59@microsoft.UUCP> <11118@pur-ee.UUCP>
Reply-To: guy@auspex.UUCP (Guy Harris)
Organization: Auspex Systems, Santa Clara
Lines: 11