ebevhan added a comment.

In D62574#2136553 <https://reviews.llvm.org/D62574#2136553>, @danilaml wrote:

> In D62574#2135662 <https://reviews.llvm.org/D62574#2135662>, @ebevhan wrote:
>
> > It's generally not safe to alter address spaces below the top level. C is 
> > just very permissive about it.
>
>
> Isn't that also true for the top-level casts? Unless when it is. And the 
> target should know when it's safe or not. It's just that for non top-level 
> casts there is added condition that casts are noop (i.e. don't change the bit 
> pattern of the pointer). At least that's how I see it.


Yes, I see what you mean. I think that the default assumption in Clang at the 
moment is that it is not safe to do so, hence the current design. Not that 
there are many targets that use address spaces, so perhaps that assumption is 
too conservative for ones that do downstream.


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

https://reviews.llvm.org/D62574



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

Reply via email to