This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [m32c] type precedence rules and pointer signs
On Jan 31, 2008 9:11 PM, DJ Delorie <dj@redhat.com> wrote:
>
> > case POINTER_PLUS_EXPR:
> > /* Even though the sizetype mode and the pointer's mode can be different
> > expand is able to handle this correctly and get the correct result out
> > of the PLUS_EXPR code. */
>
> Me thinks that comment now needs some rethinking ;-)
:)
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).
Richard.