public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/autopar_devel] coroutines: co_returns are statements, not expressions.
@ 2020-08-22 22:07 Giuliano Belinassi
  0 siblings, 0 replies; only message in thread
From: Giuliano Belinassi @ 2020-08-22 22:07 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:1eec73b0c49732d081fe3a23e8f6d7c3f28227a3

commit 1eec73b0c49732d081fe3a23e8f6d7c3f28227a3
Author: Iain Sandoe <iain@sandoe.co.uk>
Date:   Fri Jun 5 15:09:39 2020 +0100

    coroutines: co_returns are statements, not expressions.
    
    This corrects an error in the CO_RETURN_EXPR tree
    class.
    
    gcc/cp/ChangeLog:
    
            * cp-tree.def (CO_RETURN_EXPR): Correct the class
            to use tcc_statement.

Diff:
---
 gcc/cp/cp-tree.def | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/cp/cp-tree.def b/gcc/cp/cp-tree.def
index 1454802bf68..99851eb780f 100644
--- a/gcc/cp/cp-tree.def
+++ b/gcc/cp/cp-tree.def
@@ -594,9 +594,9 @@ DEFTREECODE (CO_YIELD_EXPR, "co_yield", tcc_expression, 2)
 /* The co_return expression is used to support coroutines.
 
    Op0 is the original expr, can be void (for use in diagnostics)
-   Op2 is the promise return_xxxx call for Op0. */
+   Op1 is the promise return_xxxx call for for the expression given. */
 
-DEFTREECODE (CO_RETURN_EXPR, "co_return", tcc_expression, 2)
+DEFTREECODE (CO_RETURN_EXPR, "co_return", tcc_statement, 2)
 
 /*
 Local variables:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-22 22:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-22 22:07 [gcc/devel/autopar_devel] coroutines: co_returns are statements, not expressions Giuliano Belinassi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).