[Issue 23195] codegen/calling convention bug causes small non-POD arguments to be broken for extern(C++) functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Nov 24 02:27:59 UTC 2022


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

Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla at digitalmars.com

--- Comment #1 from Walter Bright <bugzilla at digitalmars.com> ---
Compilable example:

  struct FF {
    float x, y;
    ~this();
  }

  void draw(FF min, FF max);

  void test(FF *a, FF *b) {
    draw(*a, *b);
  }

If `~this();` is commented out, the arguments are passed to draw by value.

--


More information about the Digitalmars-d-bugs mailing list