Re: sparse segfaults

From: Linus Torvalds
Date: Sun Nov 21 2004 - 20:04:24 EST




On Sun, 21 Nov 2004, Jan Engelhardt wrote:
>
> And it's specific to GCC. This kinda ruins some tries to get ICC working on the
> kernel tree :)

Ahh, but Intel compiler developers are cunning, and can make (and afaik,
_did_ make) icc compatible with the good gcc extensions.

And as we all know, the definition of "good gcc extension" really is "the
kernel uses it". (Some of the good ones turned up in C99 and are thus no
longer extensions - obviously gcc wasn't the only compiler that
implemented them).

Good gcc extensions:
- the inline asm syntax (which could be better, but hey, the gcc syntax
is certainly not the worst around either)
- statement expressions (but dammit, it should have used "return" to
return the value)
- short conditionals
- symbol attributes (sections, "used", asm naming, etc)
- local labels and computed goto
- case ranges
- typeof and alignof.
- void * arithmetic

BAD gcc extensions:
- nested functions (gaah)
- extended lvalues (casts, conditionals and comma-operators as lvalues.
They are just too confusing)
- transparent unions (dammit, you could have done it with overloading
instead).

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/