[C++ coroutines 0/6] Implement C++ coroutines.

Nathan Sidwell nathan@acm.org
Mon Nov 18 12:35:00 GMT 2019


On 11/17/19 5:23 AM, Iain Sandoe wrote:
> 
> This patch series is an initial implementation of a coroutine feature,
> expected to be standardised in C++20.

Yay!

> ABI
> ---

> There is not need to add any new mangling, since the components of this are
> regular functions with manipulation of the coroutine via a type-erased handle.

Ahem:
> --- a/gcc/cp/operators.def
> +++ b/gcc/cp/operators.def
> @@ -87,6 +87,7 @@ DEF_OPERATOR ("++", PREINCREMENT_EXPR, "pp", OVL_OP_FLAG_UNARY)
>  DEF_OPERATOR ("--", PREDECREMENT_EXPR, "mm", OVL_OP_FLAG_UNARY)
>  DEF_OPERATOR ("->", COMPONENT_REF, "pt", OVL_OP_FLAG_UNARY)
>  DEF_OPERATOR ("sizeof", SIZEOF_EXPR, "sz", OVL_OP_FLAG_UNARY)
> +DEF_OPERATOR ("co_await", CO_AWAIT_EXPR, "aw", OVL_OP_FLAG_UNARY)

That looks mangly to me.  But perhaps such manglings are unreachable.

nathan

-- 
Nathan Sidwell



More information about the Libstdc++ mailing list