Determing alignment of (char *) pointer
Henry Spencer
henry at utzoo.UUCP
Wed Dec 17 06:48:53 AEST 1986
> ... I may very well be misunderstanding what's going on here,
> but it appears to me that you're looking for a *machine-independent* way of
> performing a *machine-specific* operation. None of the methods I've seen
> (I may have missed a few) would work on a machine like the CDC 6600...
The *methods* wouldn't work, but the general notion of "is a character
pointer sufficiently well-aligned to be a valid pointer to something else"
probably remains valid on the 6600 (which I admit I'm not very familiar
with). It would not be unreasonable for a language like C to provide a
primitive for determining this, although the implementation of the primitive
would necessarily be machine-specific. [Note that this is *not* a call for
adding such a primitive to C in particular. Right now we need less inno-
vation in C's definition, not more.]
--
Henry Spencer @ U of Toronto Zoology
{allegra,ihnp4,decvax,pyramid}!utzoo!henry
More information about the Comp.lang.c
mailing list