how has C bitten you?

Andrew Koenig ark at alice.UUCP
Wed Aug 21 07:17:35 AEST 1985


> typedef union {
>		int  u1;
>		char u2;
>	} union_type;
>
> typedef struct {
>		int        f1;
>		union_type f2;
>	} struct_type;
>
> struct_type s;
>
> s.u1 = 0;   /* should be: s.f1.u1 = 0 */

Gee, our compiler certainly complains about this one.



More information about the Comp.lang.c mailing list