digitalmars.D.bugs - [Issue 6772] New: Cannot pass cfloat argument type to a function on x86_64
- d-bugmail puremagic.com (33/33) Oct 05 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6772
- d-bugmail puremagic.com (12/12) Nov 14 2012 http://d.puremagic.com/issues/show_bug.cgi?id=6772
http://d.puremagic.com/issues/show_bug.cgi?id=6772 Summary: Cannot pass cfloat argument type to a function on x86_64 Product: D Version: D1 & D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: grahamc001uk yahoo.co.uk --- Comment #0 from Graham <grahamc001uk yahoo.co.uk> 2011-10-05 13:32:18 PDT --- In the example below the function gets a different value for argument n than value passed cf. Argument type and size is OK, but value is wrong. Both D1 and D2 have this problem. Problem only present for 64 bit code. import std.stdio; void myfunc(cfloat n) { writefln("argument type is %s", typeof(n).stringof); writefln("n = 0x%X, sizeof = %d", *(cast(ulong*)&n), n.sizeof); writefln("real part %f, imag part %f", n.re, n.im); } void main() { cfloat cf; cf = 1.02f+3.04fi; writefln("cf = 0x%X, sizeof = %d", *(cast(ulong*)&cf), cf.sizeof); myfunc(cf); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 05 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6772 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla digitalmars.com Resolution| |WORKSFORME --- Comment #1 from Walter Bright <bugzilla digitalmars.com> 2012-11-14 23:47:10 PST --- This is working with the latest. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 14 2012