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

Iain Buclaw ibuclaw at gdcproject.org
Sun Dec 1 08:57:54 PST 2013


On 1 December 2013 13:15, Johannes Pfau <nospam at example.com> wrote:
> Am Sun, 24 Nov 2013 12:50:43 +0100
> schrieb "Iain Buclaw" <ibuclaw at ubuntu.com>:
>
>>
>> Apparently it's working as per C semantics, which means the
>> behavior is undefined.  I've mentioned that it makes no sense
>> that documentation/code don't match comments. But all I've heard
>> back is that you shouldn't use convert_to_integer in the front
>> end (except maybe through convert() - which I am 90% certain is
>> the case with us), and to implement our own semantics if we say
>> that pointer to integer conversion is clearly defined in D.
>>
>> Regards
>> Iain.
>
> We actually use convert_to_integer directly

d_convert_basic is called as the default for convert() so the
statement is pretty much correct.  ;-)

Yeah, we just need to apply our own semantics before falling back to
convert_to_integer.


More information about the D.gnu mailing list