Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!usc!cs.utexas.edu!uunet!pyrdc!pyrnj!mirror!pat From: pat@mirror.TMC.COM Newsgroups: comp.lang.c Subject: Re: Help, page 197 K&R !!! Message-ID: <236100020@mirror> Date: 3 Jul 89 16:12:00 GMT References: <646@kl-cs.UUCP> Lines: 16 Nf-ID: #R:kl-cs.UUCP:-64600:mirror:236100020:000:725 Nf-From: mirror.TMC.COM!pat Jul 3 12:12:00 1989 This is one of the C paragraph responses: >/* Written 3:25 am Jul 2, 1989 by gwyn@smoke.UUCP in mirror:comp.lang.c */ >In article cline@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?