================
@@ -11902,6 +11902,37 @@ QualType Sema::CheckSubtractionOperands(ExprResult
&LHS, ExprResult &RHS,
LHS.get(), RHS.get()))
return QualType();
+ // For pointer subtraction, if the address spaces differ but overlap,
+ // convert both pointers to the composite (superset) address space.
+ // This is needed because pointer subtraction compares addresses, and
+ // addresses in different spaces may have different sizes.
----------------
addmisol wrote:
Updated.
https://github.com/llvm/llvm-project/pull/217341
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits