[Issue 23195] Win64 function ABI bug for small non-POD arguments

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Nov 24 23:24:30 UTC 2022


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

kinke <kinke at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kinke at gmx.net

--- Comment #5 from kinke <kinke at gmx.net> ---
(In reply to Walter Bright from comment #4)
> Microsoft's documentation is doesn't match the behavior of their compiler.
> Having a destructor does not affect whether a struct is passed by ref or
> not, but having a copy constructor does (contrary to the documentation).

That's right. Note that there's another special case for the MSVC++ ABI: POD
structs with any ctor are returned via struct-return (the hidden result
pointer).
https://github.com/ldc-developers/ldc/blob/05fb6d5acaef1a97129317ce8f0dd712e03aee7f/gen/abi/win64.cpp#L59-L80

--


More information about the Digitalmars-d-bugs mailing list