Bug 14203 – Return of floating point values from extern(C++) member functions does not match dmc
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2015-02-20T02:37:29Z
Last change time
2020-09-03T07:14:52Z
Keywords
backend, C++, pull, wrong-code
Assigned to
No Owner
Creator
yebblies
Comments
Comment #0 by yebblies — 2015-02-20T02:37:29Z
struct C
{
float func() { return 0; }
};
The C++ version of this code returns via the stack, but the D version returns in ST(0). One of these is obviously wrong.
Same for double and real/long double, only on win32.
I don't know if this is a bug in dmd or dmc. Anyone?
Comment #1 by github-bugzilla — 2015-02-20T05:49:57Z
@WalterBright created dlang/dmd pull request #11675 "fix Issue 14203 - Return of floating point values from extern(C++) me…" fixing this issue:
- fix Issue 14203 - Return of floating point values from extern(C++) member functions does not match dmc
https://github.com/dlang/dmd/pull/11675
Comment #6 by dlang-bot — 2020-09-03T07:14:52Z
dlang/dmd pull request #11675 "fix Issue 14203 - Return of floating point values from extern(C++) me…" was merged into master:
- 20a2eb3264270d7f42fc71237e3f42331afe9ed3 by Walter Bright:
fix Issue 14203 - Return of floating point values from extern(C++) member functions does not match dmc
https://github.com/dlang/dmd/pull/11675