[Issue 5570] 64 bit C ABI not followed for passing structs and complex numbers as function parameters

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 6 03:59:47 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=5570


Marco Leise <Marco.Leise at gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Marco.Leise at gmx.de


--- Comment #34 from Marco Leise <Marco.Leise at gmx.de> 2013-02-06 03:59:36 PST ---
Is this why my XCB calls on Linux fail? I already accused XCB people of writing
incorrect tutorials until I realized that the exact same code does work in C.
After probably two hours of trial and error to fix my code and reading articles
on the web the word x86-64 showed up there and I had a dim memory of something
not working in DMD 64-bit and C structs. So I tried GDC again, which I stopped
because it produced another error somewhere else. There it works. The struct I
try to get returned by a C library function looks like this:

struct { void*, int, int }

Most notably the int fields in my case should be 116 and 1, but are 0 and 0,
while the pointer does have some value (not sure if the correct one as they
change from executable to executable).

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


More information about the Digitalmars-d-bugs mailing list