Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!ihnp4!inuxc!pur-ee!j.cc.purdue.edu!h.cc.purdue.edu!pur-phy!mrstve!rjk From: rjk@mrstve.UUCP Newsgroups: comp.lang.c Subject: Re: Determing alignment of (char *) pointer Message-ID: <579@mrstve.UUCP> Date: Wed, 10-Dec-86 08:31:09 EST Article-I.D.: mrstve.579 Posted: Wed Dec 10 08:31:09 1986 Date-Received: Sun, 14-Dec-86 01:11:21 EST References: <1510@mit-trillian.MIT.EDU> <7381@utzoo.UUCP> Reply-To: rjk@mrstve.UUCP (Richard Kuhns) Organization: Mr sTVe's, Lafayette IN Lines: 15 In article <7381@utzoo.UUCP> henry@utzoo.UUCP (Henry Spencer) writes: >> In particular, I need to determine whether the pointer is 32-bit >> aligned before attempting to store a long by casting it to a (long *). > >Speaking generally, "there ain't no graceful way". > [and so forth] Should there be? 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 (famous in song and story) with its 60 bit words. Am I right? or have I missed something? Our news feed is occasionally flakey... -- Rich Kuhns {ihnp4, decvax, etc...}!pur-ee!pur-phy!mrstve!rjk