[cfe-dev] Relational operators on pointers
mailinglists at stefan-marr.de
Wed Oct 12 15:13:14 PDT 2011
On 12 Oct 2011, at 23:54, David Chisnall wrote:
> So, if you want to do a comparison between two unrelated pointers as unsigned values, the safest thing to do is cast them to uintptr_t and then do the comparison.
Right, done, and failed. In this particular case, as Eli pointed out, some optimization is applied.
All my casting to what ever type, and with whatever mechanism, did not help.
Not even using temp variables of 64bit types with which ever signage.
That all got just optimized away...
Leaving me with a failing test without apparent reason.
More information about the cfe-dev