The constant expression evaluator for pointers returns a base and an
offset if successful. In this case, CodeGen generates a constant pointer cast,
casting the base (with offset applied if necessary) to the destination type.
However, that is different from casting the base to an integer and then to the
destination type if the destination points to another address space as the
base. Supporting this would require a lot of work because it can't be
expressed as base + offset. Changing the whole constant expression evaluator
is not worthline for supporting this special case.
Details
Details
- Reviewers
rsmith
Diff Detail
Diff Detail