www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14203] New: Return of floating point values from extern(C++)

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

          Issue ID: 14203
           Summary: Return of floating point values from extern(C++)
                    member functions does not match dmc
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Keywords: C++, wrong-code
          Severity: major
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: yebblies gmail.com

struct C
{
    float func() { return 0; }
};

The C++ version of this code returns via the stack, but the D version returns
in ST(0).  One of these is obviously wrong.

Same for double and real/long double, only on win32.

I don't know if this is a bug in dmd or dmc.  Anyone?

--
Feb 19 2015