Ldc vs dmd vs gdc

Rikki Cattermole via Digitalmars-d digitalmars-d at puremagic.com
Mon Dec 15 00:25:08 PST 2014


I found a little interesting difference between ldc, dmd and gdc today.
Summarized in ldc it does not allow you to have multiple extern c'd 
function prototypes with different parameters but same mangling aka name.

In dmd and gdc it compiles fine. I believe this is actually wrong.
As c abi does not support overloading of functions, shouldn't the 
compilers at the very least report a warning of this?

[0] https://github.com/nomad-software/x11/issues/6#issuecomment-66959937
[1] 
https://github.com/nomad-software/x11/blob/160f5109cb9f09ab69f9a16c685c5a6b39179db6/source/x11/Xlib.d#L1534
[2] 
https://github.com/nomad-software/x11/blob/160f5109cb9f09ab69f9a16c685c5a6b39179db6/source/x11/Xlib.d#L1554


More information about the Digitalmars-d mailing list