This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: Dealed with gcc bug 36834 - structure return ABI for windows targets differs from native MSVC ?
- From: Kai Tietz <ktietz70 at googlemail dot com>
- To: Just Fill Bugs <mozbugbox at yahoo dot com dot au>
- Cc: libffi-discuss at sourceware dot org
- Date: Sat, 9 Jul 2011 10:44:11 +0200
- Subject: Re: Dealed with gcc bug 36834 - structure return ABI for windows targets differs from native MSVC ?
- References: <iv38eh$7u2$1@dough.gmane.org>
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