https://bugs.winehq.org/show_bug.cgi?id=49173
Bug ID: 49173 Summary: widl generates invalid code for Gecko's ISimpleDOM.idl Product: Wine Version: unspecified Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: rpc Assignee: wine-bugs@winehq.org Reporter: emilio@crisal.io Distribution: ---
Compiling the following IDL file t.idl:
import "objidl.idl"; import "oaidl.idl";
[object, uuid(1814ceeb-49e2-407f-af99-fa755a7d2607)] interface ISimpleDOMNode : IUnknown { [propget, local] HRESULT localInterface([out][retval] void **localInterface); [propget, call_as(get_localInterface)] HRESULT remoteLocalInterface([out][retval] IUnknown **localInterface); }
With:
$ ./tools/widl/widl -m 64 --win64 -robust -Oicf t.idl -I include
Generates the following bit:
struct _PARAM_STRUCT { ISimpleDOMNode *This; IUnknown **localInterface; HRESULT _RetVal DECLSPEC_ALIGN(8); } *pParamStruct = (struct _PARAM_STRUCT *)pStubMsg->StackTop;
Which fails to compile like:
3:11.30 ISimpleDOM_p.c(65,24): error: expected ';' at end of declaration list 3:11.30 HRESULT _RetVal DECLSPEC_ALIGN(8);
Moving the DECLSPEC_ALIGN code before _RetVal fixes it.