------- Comment #5 from pinskia at gmail dot com  2009-01-16 18:33 -------
Subject: Re:  field-insensitive PTA causes libstdc++ miscompiles

On Fri, Jan 16, 2009 at 10:30 AM, rguenth at gcc dot gnu dot org
<gcc-bugzi...@gcc.gnu.org> wrote:
>
> (void *)((intptr_t)&iptr + (intptr_t)p - (intptr_t)&iptr)
>
> <==>
>
> (void *)(intptr_t)p
>
> which is guaranteed by the std

No that is not guaranteed because of:
If the result cannot be represented in the integer type, the behavior
is undefined. The result need not be in the range of values of any
integer
type.

:).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38835

Reply via email to