🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1398

Re: pointer to incomplete type?

#1398
From: Karl Heuer
Date: Tue, 05 Jun 1990 21:45
16 lines
1415 bytes
In article <1680@mcrware.UUCP> jejones@mcrware.UUCP (James Jones) writes:
>On computers for which pointers to different types don't have the same format
>(the canonical examples, I think, are non-byte-addressable processors),
>how can one safely declare a pointer to an incomplete structure...?

I believe it is still true (i.e. one can infer from the Standard) that "all
struct pointers smell the same", precisely because it must be legal to use an
incomplete type in the contexts you're thinking of.  This means that, on such
an architecture, either all structs will be word-aligned (even if they contain
only chars) or else (less likely) all struct pointers will use byte-pointer
format (even if the struct is word-aligned).

(Of course, the as-if rule allows the implementation to play tricks here if
the user can't possibly tell the difference.)

Karl W. Z. Heuer (karl@ima.ima.isc.com or harvard!ima!karl), The Walking Lint
Technical Details
Message-ID: <16797@haddock.ima.isc.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!cs.utexas.edu!uwm.edu!rpi!bu.edu!snorkelwacker!spdcc!ima!haddock!karl
References: <1680@mcrware.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!cs.utexas.edu!uwm.edu!rpi!bu.edu!snorkelwacker!spdcc!ima!haddock!karl
From: karl@haddock.ima.isc.com (Karl Heuer)
Newsgroups: comp.std.c
Subject: Re: pointer to incomplete type?
Message-ID: <16797@haddock.ima.isc.com>
Date: 5 Jun 90 21:45:06 GMT
References: <1680@mcrware.UUCP>
Reply-To: karl@haddock.ima.isc.com (Karl Heuer)
Organization: Interactive Systems, Cambridge, MA 02138-5302
Lines: 16