This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Dealed with gcc bug 36834 - structure return ABI for windows targets differs from native MSVC ?


2011/7/7 Just Fill Bugs <mozbugbox@yahoo.com.au>:
> I think I was hit by this bug when using python ctypes to wrap a function
> that return a struct by value.
>
> Has ffi been fixed to handle the situation automagically? That is, without
> special treatment with mingw, a caller from msvc can call a callee compiled
> with mingw?
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36834
>
> A ctypes discussion on 2009:
>
> ? ?http://thread.gmane.org/gmane.comp.python.ctypes.user/4439

Yes, beginning with 4.7 version of gcc the proper caller pops
aggregate return pointer ABI automatically enabled for mingw 32-bit
target.  To get old behavior of callee pops aggreate return pointer
(gnuish variant of 32-bit IA ABI), you need to specify attribute to
function manually - as described in PR/36834.

Regards,
Kai


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]