This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Preserve pointer types in ivopts


On 03/15/2012 11:12 PM, Zdenek Dvorak wrote:

> the reason unsigned integer types are prefered is that possible overflows
> during the computation have defined semantics.  With pointer types, the
> intermediate steps of the computations could have undefined behavior, possibly
> confusing further optimizations.  Is the patch with this regard?

It's trying to use sizetype for pointer offset computations. As far as I
can tell that's supposed to be an unsigned type, so it should be OK. I
think the final POINTER_PLUS_EXPRs we make can't overflow in valid programs.


Bernd


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]