[cfe-dev] Relational operators on pointers

Stefan Marr mailinglists at stefan-marr.de
Wed Oct 12 13:45:41 PDT 2011

Hi Eli:

On 12 Oct 2011, at 22:19, Eli Friedman wrote:
> The transformation in question is assuming a single memory allocation
> is less than 2GB for 32-bit code.  That's usually correct, but I guess
> it isn't in your case.  IIRC, -fwrapv will force the compiler to do
> what you want here.

Hm, just to clarify that: This is a local transformation applied only in that particular method?
And based on some assumption on typical allocation behavior, right?

Can I still safely assume that if my object heap is crossing the 0x80000000 boundary, and is segmented into a few chunks, I can still safely use relational operators to determine whether I am in a certain segment, even if that particular segment happens to have the 0x80000000 boundary in it?

I am a bit nervous about that right now.


Stefan Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
Phone: +32 2 629 2974
Fax:   +32 2 629 3525

More information about the cfe-dev mailing list