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.
This commit is contained in:
parent
1c7bcefbc9
commit
608832716e
1 changed files with 2 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue