🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #370

Re: Packing Across Inheritance Boundaries is Currently Allowed.

#370
From: Ron Guilmette
Date: Sat, 18 Aug 1990 08:19
24 lines
1489 bytes
In article <2051@key.COM> perry@arkon.key.COM (Perry The Cynic) writes:
>
>However, Ron: if you want to write "simple portable" code (no customization,
>no conditionals), you cannot possibly expect to dictate to the compiler (that
>is *every* compiler) what layout strategy it should use. The compiler is
>responsible for reconciling the language requirements with the oddities of
>the hardware. The only thing you can resonably expect to specify is guidelines.

Well, yes and no.  I understand that I can only specify (as you call them)
guidelines, but I have a reasonable expectation that the following will be
interpreted the same way on virtually every machine I care about (and even
some that I don't care about):

	struct s {
		unsigned f1:7;
		unsigned f2:9;
		unsigned f3:4;
		unsigned f4:12;
	};
-- 

// Ron Guilmette  -  C++ Entomologist
// Internet: rfg@ncd.com      uucp: ...uunet!lupine!rfg
// Motto:  If it sticks, force it.  If it breaks, it needed replacing anyway.
Technical Details
Message-ID: <1234@lupine.NCD.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!lupine!rfg
References: <1990Aug3.211414.23872@watmath.waterloo.edu> <1086@lupine.NCD.COM> <2051@key.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!lupine!rfg
From: rfg@NCD.COM (Ron Guilmette)
Newsgroups: comp.std.c++
Subject: Re: Packing Across Inheritance Boundaries is Currently Allowed.
Keywords: C++ packing layout structures
Message-ID: <1234@lupine.NCD.COM>
Date: 18 Aug 90 08:19:10 GMT
References: <1990Aug3.211414.23872@watmath.waterloo.edu> <1086@lupine.NCD.COM> <2051@key.COM>
Organization: Network Computing Devices, Inc., Mt. View, CA
Lines: 24