Help, page 197 K&R !!!
Doug Gwyn
gwyn at smoke.BRL.MIL
Fri Jul 7 02:37:44 AEST 1989
In article <236100020 at mirror> pat at mirror.TMC.COM writes:
>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?
In modern C, it is still possible to pun pointers like that,
but a cast or a union must be used. That documents quite
clearly that the programmer really did intend the ugly construct.
The old way, an inadvertent error would be silently accepted and
cause mysterious, hard to diagnose bugs.
More information about the Comp.lang.c
mailing list