Re: [C++ coroutines 3/6] Front end parsing and transforms.

2019-11-19 Thread Nathan Sidwell
On 11/17/19 5:25 AM, Iain Sandoe wrote: +++ b/gcc/cp/coroutines.cc +/* = Morph and Expand. = +/* Helpers for label creation. */ +static tree +create_anon_label_with_ctx (location_t loc, tree ctx) +{ + tree lab = build_decl (loc, LABEL_DECL, NULL_TREE, void

Re: [C++ coroutines 3/6] Front end parsing and transforms.

2019-11-18 Thread Nathan Sidwell
On 11/17/19 5:25 AM, Iain Sandoe wrote: +++ b/gcc/cp/coroutines.cc +/* FIXME: minimise headers.. */ FIXED? +/* DEBUG remove me. */ +extern void debug_tree (tree); ? +static tree find_coro_traits_template_decl (location_t); +static tree find_coro_handle_type (location_t, tree); +stati

[C++ coroutines 3/6] Front end parsing and transforms.

2019-11-17 Thread Iain Sandoe
As described in the covering note, there are two parts to this. 1. Parsing, template instantiation and diagnostics for the standard- mandated class entries. The user authors a function that becomes a coroutine (lazily) by making use of any of the co_await, co_yield or co_return keywords.