> It's correct to always sign-extend the offset to the pointer mode
> width (or simply truncate it, if the offset width is larger than
> pointer mode width).

I'd argue against that if you're dereferencing a large structure
pointer.  P->foo would always be an unsigned offset.  Similarly for
arrays, although one could argue either way with that.

In the m32c case, though, the offset is a signed type, but an unsigned
extension was used.  The mismatch is the problem.

Either way, there's going to be a compromise.

Reply via email to