[Bug tree-optimization/38835] field-insensitive PTA causes libstdc++ miscompiles
pinskia at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Jan 16 18:34:00 GMT 2009
------- 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-bugzilla@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
More information about the Gcc-bugs
mailing list