Initial Patches Wire In C++20 Coroutines For The GCC Compiler

Written by Michael Larabel in GNU on 18 November 2019 at 01:47 AM EST. 40 Comments
GNU
The GNU Compiler Collection continues picking up new features aligned for the upcoming C++20 standard. The latest are patches pending on the mailing list for implementing coroutines in C++.

C++20 is expected to have coroutines per the pending technical specification. Coroutines allow a function to have its execution stopped/suspended and then to be resumed later.

Developer Iain Sandoe has posted an initial set of patches implementing C++ coroutines similar to what is already offered by LLVM Clang and Microsoft MSVC.

These patches are a good start but in their current form are hidden behind a -fcoroutines flag until the support has been vetted.

Judging from that mailing list post, the GCC state for C++ coroutines is looking fairly good with these patches. But with GCC 10 ending its feature development and moving on to bug fixing, depending upon how it plays out this support could be delayed a year until GCC 11.

The current state of C++20 (C++2A) support within GCC can be found via this status page. A lot of functionality for what is expected of C++20 is already in place but a number of items remain.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week