This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GCC's statement expression extension


Mark Mitchell wrote:
> 
> >>>>> "Stan" == Stan Shebs <shebs@apple.com> writes:
> 
>     Stan> Do they work some of the time?  If so, then since they're
>     Stan> documented without any caveats for C++, you're stuck with
>     Stan> supporting them.
> 
> We are? I don't see that.

OK, even if the First Interstate Bank of Elbonia has a million lines
of C++ that include 20,000 distinct statement expressions that work
fine now, strictly speaking you don't have to keep G++ working for them.
Those guys will continue using an old compiler, and will tell everybody
who will listen about how they got hosed by the FSF, including their
friends at other companies who are thinking about whether to use GNU.
If you don't mind that, no problem to drop.

> There are already other C extensions that
> don't work in C++.  C++ is (still) a changing language.  If we can
> deliver better conformance at the price of a rarely used extension, I
> bet our user-base will thank us.

*If* it's rarely-used!  In the absence of a survey or widely-broadcast
announcement, you can't really know.  Apple quietly dropped Objective-C++
from OS X prereleases because we didn't think anybody used it, and
found out otherwise when we started getting messages "why can't we
compile our ObjC++ code any more?".

> We remove "signatures" in a recent release of G++, and I've heard not
> one complaint.  I think that was a good decision.  We didn't wait ten
> years.

If I understand right, there's not been an official FSF release
since they were removed - at least my 2.95 manual still describes
them.  A lot of users (such as Apple) prefer to adopt only the
official releases rather than snapshots, so they won't even know
that anything has happened to signatures until the next release comes
out.

> The C++ user community is very different from the C user community.
> C++ users are used to more change in their compilers, from version to
> version, and more intent on reaching standards-conformance than C
> users.

The way I hear it is that they just want *something* stable for a change,
and standards-conformance is just a way to get there.  For instance,
Apple's C++ developers actually care more about Metrowerks compat than
standards conformance (fortunately, Metrowerks also has the aim of being
standard).  Also, since they can only use Apple's modified version of
GCC, their complaints and problems come to us in the tools group, not to
bug-gcc.  So you probably haven't heard much of what they have to say.

> This whole discussion was probably premature.

Actually, I found it very useful!  Now I know to go look for uses
of statement expressions in Apple's existing C++ code (I suspect
there are few if any, but I've been surprised before), and to warn
our developers against depending on statement expressions in C++.

I get the sense that you wish this wasn't a discussion topic, but
that's wrong thinking; if you're contemplating changing the language
accepted by the compiler, particularly by removing constructs, you
want to let as many people as possible know about it.  Get a note up
on Slashdot for instance.  Users will accept a lot of change, as long
as they know that it's coming.

Stan

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]