GCC screws up pointer->ulong conversion on 32 bit systems

Iain Buclaw ibuclaw at ubuntu.com
Mon Nov 18 23:05:52 PST 2013


On Nov 19, 2013 6:35 AM, "Kagamin" <spam at here.lot> wrote:
>
> C first sign-extends then converts to unsigned. It's just weird it treats
pointer as signed. Was there an option for it?

No, it's a bug. The comment in the code says that it unsign-extends (if
that is even a proper word a to describe it) first before converting to
pointer.

Regards
-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/d.gnu/attachments/20131119/d6cbf767/attachment.html>


More information about the D.gnu mailing list