atl: Remove WINAPI on static functions where not needed.
chris.kcat at gmail.com
Sun Nov 23 17:33:47 CST 2008
On Sunday 23 November 2008 03:15:36 pm Francois Gouget wrote:
> To quote Ken Thomases who did the research on this issue with Alexandre:
> This is motivated by a gcc bug that we've encountered on the Mac. On
> the Mac, WINAPI (and other declspecs) include the
> force_align_arg_pointer attribute. With -O2 optimization (actually
> -funit-at-a-time, implied by -O2) the compiler may change the calling
> convention used by non-exported functions to take arguments via
> registers rather than on the stack. The prologue generated for
> force_align_arg_pointer clobbers one of those registers (and hence
> one of the arguments).
> Alexandre's preferred solution is to find and eliminate such cases.
> Even if/when the compiler bug is fixed, those functions should still
> not have the extraneous declspec.
Out of curiousity, then, does this affect static functions that are used for
COM objects? It's typical for those to be marked as static, their address put
into a (possibly static) vtable struct, which is then used as a field for an
allocated struct passed to the user.
More information about the wine-devel