🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #78

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

#78
From: Christopher R Volpe
Date: Mon, 03 Aug 1992 00:53
35 lines
2099 bytes
In article <7039@skye.ed.ac.uk>, richard@aiai.ed.ac.uk (Richard Tobin) writes:
|> In article <1992Jul31.010941.7282@crd.ge.com> volpe@ausable.crd.ge.com writes:
|> >|> *If* the standard allows "unnecessary" padding, this program is not
|> >|> strictly conforming.
|> 
|> >PRO: "But *if* unnecessary padding is ok, *then* the program isn't
|> >      Strictly Conforming, *therefore* the as-if rule still applies, 
|> >      *therefore* unnecessary padding is ok!"
|> 
|> You're over-interpreting my statement.  I wasn't trying to prove that
|> unnecessary padding is ok.  I was merely pointing out that it couldn't

Ok.

|> be a strictly conforming program that behaved differently under the
|> two interpretations, because under one of them it wouldn't be strictly
|> conforming.

There are no "two interpretations". That's the whole point. The "other
interpretation" was shot down by the strictly conforming program that
prints different results under the non-literal interpretation.

|> 
|> It appears to be the case that you can't write a strictly conforming
|> program that prints the value of any implementation-defined parameter.

Correct, but whether or not an implementation uses unnecessary padding
is NOT an implementation-defined parameter, according to a literal
reading of the Standard. The program presented is strictly conforming.

-- 
==================
Chris Volpe
G.E. Corporate R&D
volpecr@crd.ge.com
Technical Details
Message-ID: <1992Aug3.005338.1488@crd.ge.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!crdgw1!rdsunx.crd.ge.com!bart!volpe
References: <Bs5pMJ.3nM@twwells.com> <7022@skye.ed.ac.uk> <1992Jul31.010941.7282@crd.ge.com> <7039@skye.ed.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!crdgw1!rdsunx.crd.ge.com!bart!volpe
From: volpe@bart.NoSubdomain.NoDomain (Christopher R Volpe)
Newsgroups: comp.std.c
Subject: Re: Character arrays in structures and address alignment -- any standard?
Message-ID: <1992Aug3.005338.1488@crd.ge.com>
Date: 3 Aug 92 00:53:38 GMT
References: <Bs5pMJ.3nM@twwells.com> <7022@skye.ed.ac.uk> <1992Jul31.010941.7282@crd.ge.com> <7039@skye.ed.ac.uk>
Sender: volpe@bart (Christopher R Volpe)
Reply-To: volpe@ausable.crd.ge.com
Organization: GE Corporate Research & Development
Lines: 35
Nntp-Posting-Host: bart.crd.ge.com