sizeof ((rehash *) 0)->again
Norman Diamond
diamond at csl.sony.co.jp
Mon Nov 20 12:31:15 AEST 1989
In article <11628 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn) writes:
>In article <11138 at riks.csl.sony.co.jp> diamond at ws.sony.junet (Norman Diamond) writes:
>>Section 3.3.4 says that the result has the named type, i.e. rehash *.
>>Therefore the semantics of -> select a member of the pointed-to type,
>>and sizeof takes its size.
>
>This argument was already made and I disagreed before too.
>My argument is that a null pointer does not point to anything.
In the part of my posting which you deleted, I pointed out where the
standard deliberately does not define a cast null pointer to be a
null pointer constant, unless the cast is to void *. Therefore the
compiler cannot take advantage at compile time of knowing that this
is a null pointer; it has to wait until execution time (or at least
it has to appear that way). Execution-time null pointers do in fact
have a type which is known at compile-time.
--
Norman Diamond, Sony Corp. (diamond%ws.sony.junet at uunet.uu.net seems to work)
Should the preceding opinions be caught or | James Bond asked his
killed, the sender will disavow all knowledge | ATT rep for a source
of their activities or whereabouts. | licence to "kill".
More information about the Comp.std.c
mailing list