This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC's statement expression extension
- To: kenner at vlsi1 dot ultra dot nyu dot edu
- Subject: Re: GCC's statement expression extension
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Thu, 27 Jul 2000 18:38:00 -0700
- Cc: meissner at cygnus dot com, gcc at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <10007280137.AA18028@vlsi1.ultra.nyu.edu>
>>>>> "Richard" == Richard Kenner <kenner@vlsi1.ultra.nyu.edu> writes:
Michael> Speaking for the users, I would argue that removal of
Michael> statement expressions, even in C++ only, is a supremely
Michael> bad idea.
Richard> I *strongly* agree
Your opinions are valuable. Although I think you may not fully
understand the C++ user base. Those folks that I have come in contact
with eschew such extensions pretty strongly. I suspect that very,
very few C++ programs contain statement expressions -- except via
macros in C libraries.
Just refusing to remove the extensions doesn't solve the problems,
sadly. These things don't work in C++, and making them work is highly
nontrivial. Programs using the standard library don't work, because
of these decisions, and surprising behavior often results without
programmer knowledge, because these things are in the standard
library, not user code.
I think that we cannot do anything until these things are removed from
glibc. I think we cannot remove these things from glibc until we make
some improvements in the compiler to make other options equally
attractive to the library folks. And I think we can't remove these
things from the compiler until we can reasonably expect people to use
the new libraries.
On the other hand, the arguments Michael makes apply to almost any
extension, and I do not agree, by any means, that we must preserve all
extensions for all time. The same argument justifies preserving many
bugs; every time we issue an error that we did not before, we break
programs.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com