[PATCH] include: Always enable DECLSPEC_HOTPATCH for explicitly stdcall functions.

Alex Henrie alexhenrie24 at gmail.com
Wed Jul 4 11:25:42 CDT 2018


On Wed, Jul 4, 2018 at 1:31 AM Austin English <austinenglish at gmail.com> wrote:
>
> On Tue, Jul 3, 2018, 02:09 Alex Henrie <alexhenrie24 at gmail.com> wrote:
>>
>> On Tue, Jul 3, 2018 at 11:02 AM Nikolay Sivov <nsivov at codeweavers.com> wrote:
>> >
>> > On 07/03/2018 11:54 AM, Zebediah Figura wrote:
>> > > On 03/07/18 10:11, Zebediah Figura wrote:
>> > >> On 03/07/18 00:34, Alex Henrie wrote:
>> > >>> OK, I don't think this is going to work at all. After adding
>> > >>> __ms_hook_prologue__ to the definition of __stdcall, I get tons of
>> > >>> "warning: ‘ms_hook_prologue’ attribute does not apply to types".
>> > >>>
>> > >>> This makes me think that, at least for now, it's best to continue to
>> > >>> add DECLSPEC_HOTPATCH on a case-by-case basis.
>> > >>>
>> > >>>
>> > >> This seems like it would be a GCC bug; it works with other attributes
>> > >> and there's no architectural reason it can't work here.
>> > >>
>> > >>
>> > > I guess it's because of this:
>> > >
>> > > https://gcc.gnu.org/ml/gcc-patches/2009-09/msg01635.html
>> > >
>> > > I'm not sure what to do about this. Perhaps only set it on WINAPI rather
>> > > than __stdcall? Will that work everywhere?
>> >
>> > If we want that for methods too, then no, because of
>> > STDMETHODCALLTYPE/STDAPICALLTYPE. Also because of things like WMIAPI or
>> > WINGDIPAPI.
>>
>> And you get the same warnings even if you only add
>> __ms_hook_prologue__ to WINAPI.
>>
>> The warning may well be a GCC bug, but even so, I don't think we'll be
>> able to put __ms_hook_prologue__ everywhere until long after it's been
>> fixed. For now it would be best to just add DECLSPEC_HOTPATCH to
>> GetDIBits etc.
>
>
> Is there a GCC bug filed? I don't think we'll see much progress if no one has reported it.

>From the link Zeb shared, I get the impression that the GCC developers
consider the unhelpful warning to be a feature, not a bug.

-Alex



More information about the wine-devel mailing list