🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #166

Re: Character arrays in structures and address alignment -- any standard?

#166
From: Richard Tobin
Date: Thu, 30 Jul 1992 15:14
21 lines
1119 bytes
In article <Bs5pMJ.3nM@twwells.com> bill@twwells.com (T. William Wells) writes:
>: Please show a strictly conforming program which can tell the difference
>: between "necessary" padding and "unnecessary" padding.

>For example:

>	printf("%d\n", (offsetof(foo, y) - offset(foo, x)) - sizeof(int));

*If* the standard allows "unnecessary" padding, this program is not
strictly conforming.

(1.7 Compliance)

"A strictly conforming program ... shall not produce output dependent
on any unspecified, undefined, or implementation-defined behavior"

-- Richard
-- 
Richard Tobin,
AI Applications Institute,                                R.Tobin@ed.ac.uk
Edinburgh University.
Technical Details
Message-ID: <7022@skye.ed.ac.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!edcastle!aiai!richard
References: <1992Jul28.063356.28005@sq.sq.com> <14216@ksr.com> <Bs5pMJ.3nM@twwells.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!edcastle!aiai!richard
From: richard@aiai.ed.ac.uk (Richard Tobin)
Newsgroups: comp.std.c
Subject: Re: Character arrays in structures and address alignment -- any standard?
Message-ID: <7022@skye.ed.ac.uk>
Date: 30 Jul 92 15:14:42 GMT
References: <1992Jul28.063356.28005@sq.sq.com> <14216@ksr.com> <Bs5pMJ.3nM@twwells.com>
Organization: Templi Resurgentes Equites Synarchici
Lines: 21