C++ interop - what to do about long and unsigned long?
Daniel Murphy via Digitalmars-d
digitalmars-d at puremagic.com
Thu Sep 11 00:01:18 PDT 2014
"Iain Buclaw via Digitalmars-d" wrote in message
news:mailman.726.1410416827.5783.digitalmars-d at puremagic.com...
> This problem is not lost on me (and hopefully Daniel).
*sigh*
> > 2. create full fledged types __c_long and __c_ulong, and alias c_long
> > and
> > c_ulong to them.
> >
>
> This is not unreasonable. And would allow dmd to fix their whole C++
> long/ulong mangling mess.
Yeah this seems like the only reasonable one. Although I think they should
only be allowed as parameters in extern(C++) functions, where they set up
the custom mangling and then decay to int/uint/long/ulong as appropriate.
> >
> > The same issue exists for C++'s 'long double'.
>
> I don't think so, as there is 'real' for that.
real doesn't always match long double in dmd.
More information about the Digitalmars-d
mailing list