This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC's statement expression extension
On Fri, Jul 28, 2000 at 09:27:58PM -0700, Linus Torvalds wrote:
> Nobody hos shown any reasonable problem with the current statement
> expressions in C. Yes, C++ may have problems. I think C++ has problems
> regardless of statement expressions. Yet people have seriously proposed
> making statement expressions deprecated in gcc (even in the C side of
> things), even though they don't actually have any real problems associated
> with them.
The largest problem C++ currently has is C stuff that does not compile in C++
and shows up in C headers. That makes those headers useless for C++.
Statement expressions is part of the problem.
The other part is that statement expressions are gcc extensions. And thus,
not compilable with anything but gcc... as long as they're defined in
gcc-only include fragments, with a suitable fragment elsewhere, they could
be fine.
In practice, within some highly visible software, the alternative won't be
tested often (if it exists).
Hence it won't be robust at all, and will break fairly often.
This results in a tight coupling between a compiler, a language and a system.
Show me how this can be a good thing.