This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

r278480 - in /branches/c++-coroutines: ChangeLo...


Author: iains
Date: Wed Nov 20 08:27:10 2019
New Revision: 278480

URL: https://gcc.gnu.org/viewcvs?rev=278480&root=gcc&view=rev
Log:
c++-coroutines - Address review comments - expr checks, susp point enum.

Confirm that empty expressions to co_await/co_yield are handled in the
parser (add testcases to cover).  Make the suspend point kind into an
enum and rename the variable.  C++-ify the coroutine state struct.

2019-11-20  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc(struct coroutine_info): Make C++ style, comment
	fields.
	(coro_promise_type_found_p): Adjust info type name.
	(get_coroutine_promise_type): Likewise.
	(get_coroutine_handle_type): Likewise.
	(get_coroutine_self_handle_proxy): Likewise.
	(get_coroutine_promise_proxy): Likewise.
	(coro_common_keyword_context_valid_p): Adjust error message line
	wrapping.
	(coro_function_valid_p): Fix comment line wrap.
	(enum suspend_point_kind): New.
	(build_co_await): Use suspend_point_kind enum. Amend comments,
	remove TYPE_CANONICAL() lookup.
	(finish_co_await_expr): Remove extra checks on expression, use
	Use suspend_point_kind enum.
	(finish_co_yield_expr): Likewise.
	(co_await_expander): Likewise.
	(build_init_or_final_await): Likewise.

	gcc/testsuite/
	* g++.dg/coroutines/co-await-syntax-0.C: New test.
	* g++.dg/coroutines/co-yield-syntax-0.C: New test.


Added:
    branches/c++-coroutines/gcc/testsuite/g++.dg/coroutines/co-await-syntax-0.C
    branches/c++-coroutines/gcc/testsuite/g++.dg/coroutines/co-yield-syntax-0.C
Modified:
    branches/c++-coroutines/ChangeLog.coroutines
    branches/c++-coroutines/gcc/cp/coroutines.cc


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]