Re: GCC 3.4 Heads-up

From: Richard Henderson
Date: Wed Jan 07 2004 - 04:58:43 EST


On Tue, Jan 06, 2004 at 03:23:31PM -0800, Linus Torvalds wrote:
> > In ANSI C you've no alternative except memcpy, since you can't cast
> > the pointer and reference the object via some other type (assuming
> > neither type is char, yadda yadda).
>
> Sure you have. You can _always_ change
>
> (a ? b : c) = d;
>
> to
>
> tmp = d;
> a ? (b = tmp) : (c = tmp);

No, I meant his bitfield macro at all. You can't just go and
construct a bit field at random and dereference it.


r~
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/