ebevhan added a comment. So static_cast permits conversions from AS1 to AS2 where that conversion is implicitly allowed, and the new addrspace_cast would permit conversions from AS1 to AS2 where it is explicitly allowed. That seems like it fits in rather well with the idea in D57464 <https://reviews.llvm.org/D57464> regarding support for specifying permitted AS conversions in target.
How about nested pointers, such as `__X int * *` -> `__Y int * *` or `__X int * __Y *` -> `int * __Y *`? static_cast has some ruleset for how to deal with qualifiers in nested pointers, I think, but I'm not sure how the rules for ASes should be here. There's also C-style casts. Will addrspace_cast be added to the C-style cast rules somewhere? (I should probably have commented on the original RFC) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58060/new/ https://reviews.llvm.org/D58060 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits