danilaml added a comment.

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.

I think that you are write about that patch being targeted at C++ (need to do 
some C tests), but having the same implicit conversion being legal in C and not 
in C++ would be a bit confusing for the users (especially when the target knows 
it's completely safe). Anyway, this is not as important as getting this 
target-configurable AS work done. Without it, I guess the only option for 
downstream works to customize the behavior is to introduce their own 
LangAS-level AS entries, which is definitely not ideal.


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