sizeof ((rehash *) 0)->again
Doug Gwyn
gwyn at smoke.BRL.MIL
Sat Nov 18 03:11:03 AEST 1989
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.
The only open issue I know of here is whether a compiler is
obliged to accept this construct, obliged to diagnose it, or
free to randomly decide what to do about it. I wouldn't
recommend its use in portable programs.
More information about the Comp.std.c
mailing list