Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site rlgvax.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!rlgvax!guy
From: guy@rlgvax.UUCP (Guy Harris)
Newsgroups: net.lang.c
Subject: Re: SIZEOF
Message-ID: <373@rlgvax.UUCP>
Date: Fri, 18-Jan-85 23:59:32 EST
Article-I.D.: rlgvax.373
Posted: Fri Jan 18 23:59:32 1985
Date-Received: Mon, 21-Jan-85 01:15:50 EST
References: <7527@brl-tgr.ARPA>
Organization: CCI Office Systems Group, Reston, VA
Lines: 28

>  K&R page 192 first paragraph:
> 
>    "The compilers currently allow a pointer to be assigned to an integer,
> an integer to a pointer, and a pointer to a pointer of another type.
> THE ASSIGNMENT IS A PURE COPY OPERATION, WITH NO CONVERSION. ...
> 
> This says to me that the sizes must be the same. Changing the size is
> a conversion in my eye. ...

Under "Explicit pointer conversions", p. 210:

	A pointer may be converted *to any of the integral types
	large enough to hold it.  Whether an "int" or "long" is required
	is machine dependent.*  ("Italics" mine.)

Note that "integer" does not mean "int".  "4. What's in a name", last
paragraph, p. 182:

	Up to three sizes of integer, declared "short int", "int", and
	"long int", are available.

So what they meant to say on p. 192 was that a pointer may be assigned
to an integer large enough to hold it.  On some machines, "int" may not
be large enough to hold a pointer, and "long int" is the only integer
to which a pointer may be assigned.

	Guy Harris
	{seismo,ihnp4,allegra}!rlgvax!guy