Re: [clang] 6ed67cc - [Coroutines] Remove -fcoroutines-ts
chuanqi.xcq via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 27 18:24:40 PST 2023
Hi Bruno,
We talked about removing `-fcoroutines-ts` in https://github.com/llvm/llvm-project/issues/59110
and https://reviews.llvm.org/D108697. I raised the example you used here. And the conclusion
is that this is the clang's policy for `-f*-ts` options. The same thing happens for -fconcepts-ts and
-fmodules-ts. From my understanding, this is because we (clang) want less dialects and we want to
focus on the form `-std=*`.
> If my understanding now is right, `-std=c++17 -fcoroutines` should work, right?
`clang -std=c++17 -fcoroutines` shouldn't work. Since it is the same with `-fcoroutines-ts`.
But if you want or you can't update to `-std=c++20` quickly, you can use
`clang -std=c++17 -Xclang -fcoroutines` for the period of transition. But the `Xclang` options are
for developers instead of the users. So we (the users) should update
to `-std=c++20` or higher to use coroutines finally.
Thanks,
Chuanqi
------------------------------------------------------------------
From:Bruno Cardoso Lopes <bruno.cardoso at gmail.com>
Send Time:2023年2月28日(星期二) 06:51
To:Chuanqi Xu <yedeng.yd at linux.alibaba.com>; Chuanqi Xu <llvmlistbot at llvm.org>
Cc:cfe-commits <cfe-commits at lists.llvm.org>
Subject:Re: [clang] 6ed67cc - [Coroutines] Remove -fcoroutines-ts
> I understand that the name "coroutines-ts" isn't meaningful these
> days, but it also sounds like this commit does more than remove the
> flag, it caps useful functionality. How are users supposed to use
> c++17 with coroutines now? It's very common in our codebase and we
> have users relying on it.
Looks like I misread your patch, sorry! If my understanding now is
right, `-std=c++17 -fcoroutines` should work, right? We should
probably add an extra test in `clang/test/Driver/coroutines.cpp` that
just test that (we currently just test when it's not).
Cheers,
--
Bruno Cardoso Lopes
http://www.brunocardoso.cc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230228/40ceb2eb/attachment-0001.html>
More information about the cfe-commits
mailing list