[PATCH] D92662: [Clang][Coroutine] Drop const attribute on pthread_self when coroutine is enabled

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 9 18:04:53 PST 2020


MaskRay added a comment.

In D92662#2444196 <https://reviews.llvm.org/D92662#2444196>, @lxfind wrote:

> In D92662#2443970 <https://reviews.llvm.org/D92662#2443970>, @MaskRay wrote:
>
>> If the attribute is not suitable, glibc should drop it. The compiler can add `readnone`/`readonly` if appropriate.
>
> It's a C library interface though, and Coroutine is likely too new for this. I think that in the long run when Coroutine is pervasive we probably should drop it, but for now it's likely going to be hard for the glibc community to consider dropping it.

My comment is more about "we should bring awareness to the glibc community" (sending a plain-text message to libc-alpha at sourceware.org), otherwise if we decide to add a special case, such a hack will stay in Clang forever.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92662/new/

https://reviews.llvm.org/D92662



More information about the cfe-commits mailing list