https://gcc.gnu.org/bugzilla/show_bug.cgi?id=772

--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Ed Smith-Rowland from comment #14)
> I wonder what the relationship of these expression statements are to lambdas.
> 
> Is ({int _a = (a), _b = (b); _a > _b ? _a : _b; })
> equivalent to
> [](){int _a = (a), _b = (b); _a > _b ? _a : return _b; }}
> 
> Can expression statements change enclosing scope variables?  It seems like
> they could.  The lambda may need to be mutable.
> 
> Maybe these could route to the lambda code.
> 
> Just an idle thought.

There are substantial differences.
E.g. one can do ({ return 1; }), with lambdas it means something different,
or ({ break; }) or ({ continue; }).

Reply via email to