[comp.std.c] sizeof a struc field

diamond@csl.sony.co.jp (Norman Diamond) (10/13/89)

>-)) ... WHY (((type *)0)->anything) is disallowed in the context
>-)) of compile-time expressions.

In article <11263@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes:

>-) Because (type *)0 is SYNTACTICALLY a null pointer ...
>... there IS no type information, because the construct is
>officially meaningless.  You THINK you know what type was MEANT,
>but the compiler is not obliged to mimic your thought processes.
>This is not an issue about sizeof, but rather about ->.

No type information?

int *ip;
ip = (float *) 0;

Is this legal?  A null pointer can be assigned to ip.  Null pointers
have no type?

-- 
Norman Diamond, Sony Corp. (diamond%ws.sony.junet@uunet.uu.net seems to work)
  The above opinions are inherited by your machine's init process (pid 1),
  after being disowned and orphaned.  However, if you see this at Waterloo or
  Anterior, then their administrators must have approved of these opinions.