* [Bug c++/772] Statement expressions issues
[not found] <bug-772-4@http.gcc.gnu.org/bugzilla/>
@ 2011-11-23 19:39 ` 3dw4rd at verizon dot net
2021-01-19 13:57 ` jakub at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: 3dw4rd at verizon dot net @ 2011-11-23 19:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=772
Ed Smith-Rowland <3dw4rd at verizon dot net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |3dw4rd at verizon dot net
--- Comment #14 from Ed Smith-Rowland <3dw4rd at verizon dot net> 2011-11-23 18:57:25 UTC ---
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.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/772] Statement expressions issues
[not found] <bug-772-4@http.gcc.gnu.org/bugzilla/>
2011-11-23 19:39 ` [Bug c++/772] Statement expressions issues 3dw4rd at verizon dot net
@ 2021-01-19 13:57 ` jakub at gcc dot gnu.org
2021-01-19 13:58 ` jakub at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-01-19 13:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=772
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nbkolchin at gmail dot com
--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
*** Bug 98682 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/772] Statement expressions issues
[not found] <bug-772-4@http.gcc.gnu.org/bugzilla/>
2011-11-23 19:39 ` [Bug c++/772] Statement expressions issues 3dw4rd at verizon dot net
2021-01-19 13:57 ` jakub at gcc dot gnu.org
@ 2021-01-19 13:58 ` jakub at gcc dot gnu.org
2021-01-20 9:37 ` jakub at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-01-19 13:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=772
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
*** Bug 95465 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/772] Statement expressions issues
[not found] <bug-772-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2021-01-19 13:58 ` jakub at gcc dot gnu.org
@ 2021-01-20 9:37 ` jakub at gcc dot gnu.org
2021-07-22 21:57 ` pinskia at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-01-20 9:37 UTC (permalink / raw)
To: gcc-bugs
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; }).
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/772] Statement expressions issues
[not found] <bug-772-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2021-01-20 9:37 ` jakub at gcc dot gnu.org
@ 2021-07-22 21:57 ` pinskia at gcc dot gnu.org
2021-07-22 21:57 ` pinskia at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-22 21:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=772
--- Comment #18 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 17913 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/772] Statement expressions issues
[not found] <bug-772-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2021-07-22 21:57 ` pinskia at gcc dot gnu.org
@ 2021-07-22 21:57 ` pinskia at gcc dot gnu.org
2021-07-22 21:58 ` pinskia at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-22 21:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=772
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |donald.chai at synopsys dot com
--- Comment #19 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 70741 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/772] Statement expressions issues
[not found] <bug-772-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2021-07-22 21:57 ` pinskia at gcc dot gnu.org
@ 2021-07-22 21:58 ` pinskia at gcc dot gnu.org
2021-07-22 23:16 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-22 21:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=772
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |89003
CC| |wilkey at drive dot ai
--- Comment #20 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 89003 has been marked as a duplicate of this bug. ***
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89003
[Bug 89003] Return inside a statement expression while initializing a static
local variable fails to cleanup cxa_guard
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/772] Statement expressions issues
[not found] <bug-772-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2021-07-22 21:58 ` pinskia at gcc dot gnu.org
@ 2021-07-22 23:16 ` pinskia at gcc dot gnu.org
2022-07-23 10:54 ` egallager at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-22 23:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=772
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vegard.nossum at gmail dot com
--- Comment #21 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 84745 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/772] Statement expressions issues
[not found] <bug-772-4@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2021-07-22 23:16 ` pinskia at gcc dot gnu.org
@ 2022-07-23 10:54 ` egallager at gcc dot gnu.org
2022-10-03 16:41 ` pinskia at gcc dot gnu.org
2022-12-01 8:41 ` egallager at gcc dot gnu.org
10 siblings, 0 replies; 15+ messages in thread
From: egallager at gcc dot gnu.org @ 2022-07-23 10:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=772
--- Comment #22 from Eric Gallager <egallager at gcc dot gnu.org> ---
oops wait I thought this was a meta-bug for a moment... although, maybe it's
time to start using it as one?
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/772] Statement expressions issues
[not found] <bug-772-4@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2022-07-23 10:54 ` egallager at gcc dot gnu.org
@ 2022-10-03 16:41 ` pinskia at gcc dot gnu.org
2022-12-01 8:41 ` egallager at gcc dot gnu.org
10 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-10-03 16:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=772
--- Comment #23 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Part of the C++ front-end issues was fixed with
r13-3046-gc823366fdb9069a54a37a3b18b65a4fa69feabfd . I didn't look to see if
all were fixed though.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/772] Statement expressions issues
[not found] <bug-772-4@http.gcc.gnu.org/bugzilla/>
` (9 preceding siblings ...)
2022-10-03 16:41 ` pinskia at gcc dot gnu.org
@ 2022-12-01 8:41 ` egallager at gcc dot gnu.org
10 siblings, 0 replies; 15+ messages in thread
From: egallager at gcc dot gnu.org @ 2022-12-01 8:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=772
--- Comment #24 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Eric Gallager from comment #22)
> oops wait I thought this was a meta-bug for a moment... although, maybe it's
> time to start using it as one?
Never mind about this; looks like there's a keyword (stmt-expr) now to use
instead...
^ permalink raw reply [flat|nested] 15+ messages in thread