Re: GCC 3.4 Heads-up

From: Linus Torvalds
Date: Sun Jan 04 2004 - 21:27:02 EST




On Sun, 4 Jan 2004, Bill Davidsen wrote:
>
> You pointed out that this generates good code, I pointed out that it
> also avoids future errors and is not just a trick for broken compilers.
> I take your point about generating good code, I'm sorry you can't see
> that avoiding code duplication is good practice even without the benefit
> of better code.

Don't be silly. Using non-standard C is _never_ good practice.

If 'd' is a complex expression, and you want to avoid duplicating it, just
create another temporary variable.

THAT is good practice. Not strange gcc-only special code that other
compilers won't touch.

Linus
-
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/