SIZEOF

cottrell at nbs-vms.ARPA cottrell at nbs-vms.ARPA
Sat Jan 19 11:31:58 AEST 1985


 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 usage is
nonportable, and may produce pointers which cause addressing exceptions
when used. However, it is guaranteed that the assignment of the constant
0 to a pointer will produce a null pointer distinguishable from a pointer
to any object."

This says to me that the sizes must be the same. Changing the size is
a conversion in my eye. I believe you when you say that there are compilers
in wide use that do this, but I have heard lots of weird stuff about
what someone's compiler does. Brain damage is everywhere!
*/



More information about the Comp.lang.c mailing list