This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Is there any plans or work going on gcc related to c++ coroutines?
- From: Xi Ruoyao <ryxi at stu dot xidian dot edu dot cn>
- To: Ignas Bra??i??kis <ignas dot brasiskis at gmail dot com>, gcc-help at gcc dot gnu dot org
- Cc: ryxi at stu dot xidian dot edu dot cn
- Date: Tue, 15 Aug 2017 19:12:12 +0800
- Subject: Re: Is there any plans or work going on gcc related to c++ coroutines?
- Authentication-results: sourceware.org; auth=none
- References: <CAKbRAu6ngqPomNcNjpKdLivsofrr809YG8OQq_OkERZSa2d2TQ@mail.gmail.com>
On 2017-08-15 11:14 +0300, Ignas Brašiškis wrote:
> Hello I had seen some work in both msvc and clang related to
> coroutines. I tried searching about what is the status of that
> (pre-)experimental feature in GCC and managed only find a some
> diagnostic patch. I got curious is there is any work related on gcc
> yet?
Coroutine is not a C/C++ language feature. But of course you can
implement your own coroutine library with GCC, and some system level
hacking like setjmp or setcontext. For example
<https://github.com/Tencent/libco>.
I don't think it's the C/C++ compilers' duty to support coroutine.
If you want a language with built-in coroutines, maybe you should use
Go.
--
Xi Ruoyao <ryxi@stu.xidian.edu.cn>
School of Aerospace Science and Technology, Xidian University