GCC's statement expression extension

Stan Shebs shebs@apple.com
Fri Jul 28 13:07:00 GMT 2000


Gabriel Dos Reis wrote:
> 
> Stan Shebs <shebs@apple.com> writes:
> 
> [...]
> 
> | If you deprecate statement expressions in C++ today, you might be able to
> | remove them 10 years from now.  Or to be more accurate, you could remove
> | them today, but it would ruin GCC's reputation.  The documentation is
> | basically a promise that GCC will make its best effort to conform to
> | the described behavior;
> 
> Was there a promise that statement expressions will work with C++?

Actually, there's a loophole; the head of the "Extensions to the C Language
Family" chapter says "Most of the [extensions in this chapter] are also
available in C++."  Some extensions are explicitly characterized as
deprecated for C++, such as generalized lvalues, but statement expressions
have no such caution.  So there's no explicit promise involved here.

Stan


More information about the Gcc mailing list