sizeof a struc field

Doug Gwyn gwyn at smoke.BRL.MIL
Wed Sep 20 07:02:11 AEST 1989


In article <131 at dtoa3.dt.navy.mil> stuart at dtix.dt.navy.mil (Stuart Pearlman) writes:
-In article <11086 at smoke.BRL.MIL> gwyn at smoke.BRL.MIL (Doug Gwyn) writes:
-:In article <7710 at microsoft.UUCP> peterwu at microsoft.UUCP (Peter Wu ) writes:
-:>#define SIZEGHI sizeof(((struct abc *)0)->ghi)
-:No, that doesn't necessarily work.  Review the interminable discussions
-:about use of null pointers.
-What is important is the type of sizeof's argument, and that certainly
-seems well defined.

Is the type of an illegal expression well defined?
Perhaps it's the same as the type of one hand clapping.



More information about the Comp.lang.c mailing list