[C++ coroutines] Initial implementation pushed to master.

Iain Sandoe iain@sandoe.co.uk
Mon Jan 20 21:53:00 GMT 2020


Richard Biener <richard.guenther@gmail.com> wrote:

> On Sat, Jan 18, 2020 at 2:02 PM Iain Sandoe <iain@sandoe.co.uk> wrote:
>> Hi Jakub,
>>
>> Jakub Jelinek <jakub@redhat.com> wrote:
>>
>>> On Sat, Jan 18, 2020 at 12:53:48PM +0000, Iain Sandoe wrote:
>>> Thanks.
>>>
>>> Shouldn't this be mentioned in  
>>> https://gcc.gnu.org/projects/cxx-status.html
>>> ?
>>>
>>>> * This is not enabled by default (even for -std=c++2a), it needs
>>>> -fcoroutines.
>>>
>>> And, if this is the planned case even for GCC 10 release, I think the
>>> -fcoroutines option needs to be mentioned there too.
>>
>> Yes, (and I also need to update the wiki), just didn’t want to delay the
>> commit any
>> more.
>>
>> I will get onto those (on Monday probably).
>
> It also deserves a changes.html entry in the C++ parts.

OK

>  Does the compiler
> hint at using -fcoroutines when the user tries to use those and specifies
> -std=c++2a?

the library header will complain that -fcoroutines is needed, and nothing is
really usable without it (I suppose that if a user wants to supply their own
replacement header, then they would have to discover this).

Keywords and builtins will also fail, although I am not sure if they will  
give a
hint - can look into that.

>  (I'm curious about the -fcoroutines requirement, is that because
> the implementation might still become incompatible with the actual c++2a?)

There are still a couple of things under discussion that should be expected  
to
be resolved at the next WG21 meeting, so that hopefully (assuming the impact
is restricted to changes that are thought to be acceptible) we ought to be  
lined
up before GCC 10 releases, however, one cannot guarantee this - so playing
safe for now.

Iain





More information about the Libstdc++ mailing list