<div dir="auto"><div><div class="gmail_quote"><div dir="ltr">On Tue, Jul 3, 2018, 02:09 Alex Henrie <<a href="mailto:alexhenrie24@gmail.com">alexhenrie24@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, Jul 3, 2018 at 11:02 AM Nikolay Sivov <<a href="mailto:nsivov@codeweavers.com" target="_blank" rel="noreferrer">nsivov@codeweavers.com</a>> wrote:<br>
><br>
> On 07/03/2018 11:54 AM, Zebediah Figura wrote:<br>
> > On 03/07/18 10:11, Zebediah Figura wrote:<br>
> >> On 03/07/18 00:34, Alex Henrie wrote:<br>
> >>> OK, I don't think this is going to work at all. After adding<br>
> >>> __ms_hook_prologue__ to the definition of __stdcall, I get tons of<br>
> >>> "warning: ‘ms_hook_prologue’ attribute does not apply to types".<br>
> >>><br>
> >>> This makes me think that, at least for now, it's best to continue to<br>
> >>> add DECLSPEC_HOTPATCH on a case-by-case basis.<br>
> >>><br>
> >>> -Alex<br>
> >>><br>
> >>><br>
> >> This seems like it would be a GCC bug; it works with other attributes<br>
> >> and there's no architectural reason it can't work here.<br>
> >><br>
> >><br>
> > I guess it's because of this:<br>
> ><br>
> > <a href="https://gcc.gnu.org/ml/gcc-patches/2009-09/msg01635.html" rel="noreferrer noreferrer" target="_blank">https://gcc.gnu.org/ml/gcc-patches/2009-09/msg01635.html</a><br>
> ><br>
> > I'm not sure what to do about this. Perhaps only set it on WINAPI rather<br>
> > than __stdcall? Will that work everywhere?<br>
><br>
> If we want that for methods too, then no, because of<br>
> STDMETHODCALLTYPE/STDAPICALLTYPE. Also because of things like WMIAPI or<br>
> WINGDIPAPI.<br>
<br>
And you get the same warnings even if you only add<br>
__ms_hook_prologue__ to WINAPI.<br>
<br>
The warning may well be a GCC bug, but even so, I don't think we'll be<br>
able to put __ms_hook_prologue__ everywhere until long after it's been<br>
fixed. For now it would be best to just add DECLSPEC_HOTPATCH to<br>
GetDIBits etc.<br>
<br>
-Alex<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Is there a GCC bug filed? I don't think we'll see much progress if no one has reported it.</div><div dir="auto"><br></div><div dir="auto">Once fixed, we could probably add a configure check to see if we get a warning or not, and enable it based on that check, a la how we handle checks for CFLAGS. (Though that won't help for functions that currently use it getting it enabled twice, I guess).</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>