Help, page 197 K&R !!!

pat at mirror.TMC.COM pat at mirror.TMC.COM
Tue Jul 4 02:12:00 AEST 1989


This is one of the C paragraph responses:

>/* Written  3:25 am  Jul  2, 1989 by gwyn at smoke.UUCP in mirror:comp.lang.c */
>In article <CLINE.89Jul1102015 at sun.soe.clarkson.edu> cline at sun.soe.clarkson.edu (Marshall Cline) writes:
>>	{	char	*p;
>>		p->squiggle = 3;  /* implicit cast of "p" to "(worm_t *)p" */
>
>I don't think that was ever allowed; some older C compilers did permit
>pointers to one structure type to be used to access members of another
>structure type, but that's as weird as I recall it getting.
>/* End of text from mirror:comp.lang.c */

I agree that this is weard and it is bad programming practice, but is
it possible that if the programmer knew what he was doing should it be
okay for him to do it?  



More information about the Comp.lang.c mailing list