[Issue 11740] [64-bit] Struct with constructor incorrectly passed on stack

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Dec 15 20:52:42 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11740



--- Comment #3 from yebblies <yebblies at gmail.com> 2013-12-16 15:52:29 EST ---
(In reply to comment #1)
> Errm...
> 
> This is working correctly as designed. Structs with constructors are considered
> non-POD, so they cannot be bit-copied in and out of registers.

No, it is not.  Constructors should not cause a struct to be considered non-POD
for extern(C++) functions.  I don't care what we do with extern(D) functions,
but we need to match the C++ compiler.

"If a C++ object has either a non-trivial copy constructor or a non-trivial
destructor [11], it is passed by invisible reference (the object is replaced in
the parameter list by a pointer that has class INTEGER)[12]"

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list