This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC's statement expression extension
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