Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!lll-lcc!rutgers!mit-eddie!husc6!necntc!encore!linus!philabs!micomvax!musocs!mcgill-vision!mouse
From: mouse@mcgill-vision.UUCP (der Mouse)
Newsgroups: comp.lang.c
Subject: Re: structure element offsets
Message-ID: <588@mcgill-vision.UUCP>
Date: Sun, 21-Dec-86 03:34:24 EST
Article-I.D.: mcgill-v.588
Posted: Sun Dec 21 03:34:24 1986
Date-Received: Mon, 22-Dec-86 18:42:02 EST
References: <1096@spice.cs.cmu.edu> <7377@utzoo.UUCP>
Organization: McGill University, Montreal
Lines: 24

In article <7377@utzoo.UUCP>, henry@utzoo.UUCP (Henry Spencer) writes:
> Or perhaps you were thinking of (type *)(long)x == x ?  That would
> make me nervous but it is technically valid.

Is it?  I seem to remember something in K&R to this effect:

	A pointer may be converted to any integral type large enough to
	hold it.

This does not guarantee that there *is* any integral type large enough
to hold a pointer (any pointer).  On the other hand, they continue

	Whether an int or long is required is machine dependent.

thereby implying that at least one of (int,long) will be sufficient.
But they don't come right out and *say* so, do they?  Do H&S or X3J11
say anything about this?

					der Mouse

USA: {ihnp4,decvax,akgua,utzoo,etc}!utcsri!mcgill-vision!mouse
     think!mosart!mcgill-vision!mouse
Europe: mcvax!decvax!utcsri!mcgill-vision!mouse
ARPAnet: think!mosart!mcgill-vision!mouse@harvard.harvard.edu