PATCH RFC: Warn about pointer wraparound with -Wstrict-overflow

Andrew Pinski pinskia@gmail.com
Tue Apr 8 21:54:00 GMT 2008


On Tue, Apr 8, 2008 at 12:44 PM, Paul Brook <paul@codesourcery.com> wrote:
>  On some targets (e.g. ARM) I believe base+offset addressing modes are
>  undefined if the calculation overflows.  So to implement -fwrapv for pointers
>  reliably you may need to disable these adressing modes.

HPPA for sure.  It is one of the reasons why I created pointer plus
:).  The other reason is that everyother compiler does represents
pointer arithmetic like that and not with the additional cast to a
pointer type.

Thanks,
Andrew Pinski



More information about the Gcc-patches mailing list