Messages in this thread | | | Date | Thu, 25 Dec 2003 20:34:33 -0800 (PST) | From | Linus Torvalds <> | Subject | Re: GCC 3.4 Heads-up |
| |
On Thu, 25 Dec 2003, H. Peter Anvin wrote: > > > > Other than the constant barrage of warnings about the use of compound > > expressions as lvalues being deprecated* (mostly because of lines 114, > > 116, and 117 of rcupdate.h, which is included everywhere), the build > > goes very well. > > > > *It also doesn't like cast or conditional expressions as lvalues. > > > > Okay, that's just insane...
Actually, those language extensions (while documented for a long time) are pretty ugly.
Some of that ugliness turns into literal bugs when C++ is used.
The cast/conditional expression as lvalue are _particularly_ ugly extensions, since there is absolutely zero point to them. They are very much against what C is all about, and writing something like this:
a ? b : c = d;
is something that only a high-level language person could have come up with. The _real_ way to do this in C is to just do
*(a ? &b : &c) = d;
which is portable C, does the same thing, and has no strange semantics.
Similarly, what the _hell_ does the gcc extension
int a;
(char)a += b;
really mean? The whole extension is just braindamaged, again probably because there were non-C people involved at some point. It's very much against the C philosophy. I bet 99% of the people on this list have no clue what the exact semantics of the above are.
Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |