digitalmars.D - Ldc vs dmd vs gdc
- Rikki Cattermole (11/11) Dec 15 2014 I found a little interesting difference between ldc, dmd and gdc today.
- Rikki Cattermole (5/20) Dec 25 2014 Could really use an answer to this.
- Iain Buclaw via Digitalmars-d (8/22) Dec 26 2014 function prototypes with different parameters but same mangling aka name...
- Rikki Cattermole (3/28) Dec 26 2014 This is the answer I was looking for thank you. Just needed somebody to
- Rikki Cattermole (2/35) Dec 26 2014 https://issues.dlang.org/show_bug.cgi?id=13896
- Iain Buclaw via Digitalmars-d (10/39) Dec 26 2014 today.
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
Dec 15 2014
On Monday, 15 December 2014 at 08:25:16 UTC, Rikki Cattermole wrote: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#L1554Could really use an answer to this. Another person discovered this in the wild. http://forum.dlang.org/post/gpfxidqvrseuhxpnckzu forum.dlang.org
Dec 25 2014
On 26 Dec 2014 07:25, "Rikki Cattermole via Digitalmars-d" < digitalmars-d puremagic.com> wrote:On Monday, 15 December 2014 at 08:25:16 UTC, Rikki Cattermole wrote:function prototypes with different parameters but same mangling aka name.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'dcompilers at the very least report a warning of this?In dmd and gdc it compiles fine. I believe this is actually wrong. As c abi does not support overloading of functions, shouldn't thehttps://github.com/nomad-software/x11/blob/160f5109cb9f09ab69f9a16c685c5a6b39179db6/source/x11/Xlib.d#L1534[0] https://github.com/nomad-software/x11/issues/6#issuecomment-66959937 [1]https://github.com/nomad-software/x11/blob/160f5109cb9f09ab69f9a16c685c5a6b39179db6/source/x11/Xlib.d#L1554[2]Could really use an answer to this. Another person discovered this in the wild. http://forum.dlang.org/post/gpfxidqvrseuhxpnckzu forum.dlang.orgI would raise a bug if there isn't already one. The frontend should at least disallow conflicting extern(C) prototypes.
Dec 26 2014
On 26/12/2014 10:30 p.m., Iain Buclaw via Digitalmars-d wrote:On 26 Dec 2014 07:25, "Rikki Cattermole via Digitalmars-d" <digitalmars-d puremagic.com <mailto:digitalmars-d puremagic.com>> wrote: > > On Monday, 15 December 2014 at 08:25:16 UTC, Rikki Cattermole wrote: >> >> 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 > > > Could really use an answer to this. > Another person discovered this in the wild. > http://forum.dlang.org/post/gpfxidqvrseuhxpnckzu forum.dlang.org I would raise a bug if there isn't already one. The frontend should at least disallow conflicting extern(C) prototypes.This is the answer I was looking for thank you. Just needed somebody to confirm.
Dec 26 2014
On 26/12/2014 10:42 p.m., Rikki Cattermole wrote:On 26/12/2014 10:30 p.m., Iain Buclaw via Digitalmars-d wrote:https://issues.dlang.org/show_bug.cgi?id=13896On 26 Dec 2014 07:25, "Rikki Cattermole via Digitalmars-d" <digitalmars-d puremagic.com <mailto:digitalmars-d puremagic.com>> wrote: > > On Monday, 15 December 2014 at 08:25:16 UTC, Rikki Cattermole wrote: >> >> 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 > > > Could really use an answer to this. > Another person discovered this in the wild. > http://forum.dlang.org/post/gpfxidqvrseuhxpnckzu forum.dlang.org I would raise a bug if there isn't already one. The frontend should at least disallow conflicting extern(C) prototypes.This is the answer I was looking for thank you. Just needed somebody to confirm.
Dec 26 2014
On 26 Dec 2014 09:45, "Rikki Cattermole via Digitalmars-d" < digitalmars-d puremagic.com> wrote:On 26/12/2014 10:30 p.m., Iain Buclaw via Digitalmars-d wrote:today.On 26 Dec 2014 07:25, "Rikki Cattermole via Digitalmars-d" <digitalmars-d puremagic.com <mailto:digitalmars-d puremagic.com>> wrote: > > On Monday, 15 December 2014 at 08:25:16 UTC, Rikki Cattermole wrote: >> >> I found a little interesting difference between ldc, dmd and gdchttps://github.com/nomad-software/x11/issues/6#issuecomment-66959937>> 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/blob/160f5109cb9f09ab69f9a16c685c5a6b39179db6/source/x11/Xlib.d#L1534>> [1]https://github.com/nomad-software/x11/blob/160f5109cb9f09ab69f9a16c685c5a6b39179db6/source/x11/Xlib.d#L1554>> [2]confirm.> > > Could really use an answer to this. > Another person discovered this in the wild. > http://forum.dlang.org/post/gpfxidqvrseuhxpnckzu forum.dlang.org I would raise a bug if there isn't already one. The frontend should at least disallow conflicting extern(C) prototypes.This is the answer I was looking for thank you. Just needed somebody toYou don't need confirmation to raise a bug. Just do it. There's no wrongs or rights here. Iain.
Dec 26 2014