sizeof a struc field

Wm E Davidsen Jr davidsen at crdos1.crd.ge.COM
Sat Oct 7 01:28:50 AEST 1989


In article <7653 at cdis-1.uucp>, tanner at cdis-1.uucp (Dr. T. Andrews) writes:

|  Remember that sizeof() is a compile-time operation.  Do we expect
|  the compiler to do flow analysis to determine whether we are feeding
|  a valid pointer into a sizeof() expression?

  Why should flow analysis be needed? If the pointer is defined, call it
p, then:
	sizeof(p)	sizeof a pointer to a {type}
	sizeof(*p)	sizeof an object of {type}
-- 
bill davidsen	(davidsen at crdos1.crd.GE.COM -or- uunet!crdgw1!crdos1!davidsen)
"The world is filled with fools. They blindly follow their so-called
'reason' in the face of the church and common sense. Any fool can see
that the world is flat!" - anon



More information about the Comp.lang.c mailing list