[Issue 11740] [64-bit] Struct with constructor incorrectly passed on stack to extern(C++) function

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Dec 21 08:11:12 PST 2013


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



--- Comment #7 from Iain Buclaw <ibuclaw at ubuntu.com> 2013-12-21 08:11:07 PST ---
(In reply to comment #5)
> extern(C++) functions must do what the corresponding c++ compiler does.

The definition of POD:

A PODS type in C++ is defined as either a scalar type or a PODS class. A PODS
class has no user-defined copy assignment operator, no user-defined destructor,
and no non-static data members that are not themselves PODS. Moreover, a PODS
class must be an aggregate, meaning it has no user-declared constructors, no
private nor protected non-static data, no base classes and no virtual
functions.



So if g++ treats structs as POD if there is a user defined constructor, then
that would be a problem - as it should not be treated it as POD, empty or
non-empty.

-- 
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