From: Alex Henrie Subject: Re: [PATCH] riched20: Avoid using GCC's typeof extension Message-Id: Date: Mon, 24 Sep 2018 07:41:57 -0600 In-Reply-To: <20180924075822.GA27568@merlot.physics.ox.ac.uk> References: <20180921033407.4193-1-alexhenrie24@gmail.com> <20180924075822.GA27568@merlot.physics.ox.ac.uk> On Mon, Sep 24, 2018 at 1:58 AM Huw Davies wrote: > > On Thu, Sep 20, 2018 at 09:34:07PM -0600, Alex Henrie wrote: > > Signed-off-by: Alex Henrie > > --- > > dlls/riched20/txthost.c | 86 ++++++++++++++++++++--------------------- > > dlls/riched20/txtsrv.c | 4 +- > > 2 files changed, 45 insertions(+), 45 deletions(-) > > > > diff --git a/dlls/riched20/txthost.c b/dlls/riched20/txthost.c > > index b479bde81b..d929a1a0a3 100644 > > --- a/dlls/riched20/txthost.c > > +++ b/dlls/riched20/txthost.c > > @@ -501,9 +501,9 @@ DECLSPEC_HIDDEN HRESULT WINAPI ITextHostImpl_TxGetSelectionBarWidth(ITextHost *i > > > > #ifdef __i386__ /* thiscall functions are i386-specific */ > > > > -#define THISCALL(func) __thiscall_ ## func > > +#define THISCALL(func) (void *) __thiscall_ ## func > > #define DEFINE_THISCALL_WRAPPER(func,args) \ > > - extern typeof(func) THISCALL(func); \ > > + extern void * __thiscall_ ## func(void); \ > > __ASM_STDCALL_FUNC(__thiscall_ ## func, args, \ > > "popl %eax\n\t" \ > > "pushl %ecx\n\t" \ > > We lose type-checking when assigning function ptrs to vtbl entries, which is > unfortunate. I think we'll be OK because there's still type-checking when compiling 64-bit Wine. -Alex