jhuber6 added a comment.

In D151087#4360818 <https://reviews.llvm.org/D151087#4360818>, @ebevhan wrote:

> By "freestanding C++" I assume you mean "C++ without the OpenCL C++ 
> extension" and not "C++ without extensions at all", because in the latter 
> case, you don't have address spaces either.
>
> This is what I meant in D58346 <https://reviews.llvm.org/D58346> by "There's 
> many places in the codebase where OpenCL flags restrict generic address space 
> behavior." Isn't the solution here to allow addrspace_cast even when OpenCL 
> C++ isn't turned on, as a more generic extension?

You can have address spaced in freestanding C++, they just need to be assigned 
according to the backend, e.g. https://godbolt.org/z/ahazae6Ta. And I don't 
think that's a desirable solution because it would require a language extension 
to cover a use-case that isn't disallowed by the C++ standard anyway. I don't 
see a reason why we shouldn't be able to do this directly.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151087

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to