[Issue 20235] C++ ABI doesn't destruct struct arguments in the callee

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 28 08:33:04 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=20235

Dlang Bot <dlang-bot at dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/dmd pull request #12012 "Reboot of Fix issue 20235 - caller destroys
arguments on POSIX #10593" was merged into master:

- 87206db1c37c22b5bfab5a46aa0cf56192a903c5 by سليمان السهمي (Suleyman Sahmi):
  Fix issue 20235 - Caller destroys arguments on POSIX

  On Windows, arguments are destroyed in the callee,
  regardless of which calling convention is used (cdecl, stdcall... etc),
  32bits and 64bits alike.

  On the other platforms, the caller destroys the arguments if the caller
cleans the stack.
  This changes the backend to respect the POSIX ABI on POSIX,
  allowing to correctly pass C++ objects by value accross language boundaries.

  Co-authored-by: Walter Bright <walter at walterbright.com>

https://github.com/dlang/dmd/pull/12012

--


More information about the Digitalmars-d-bugs mailing list