<div dir="ltr">Talking of things to skip:<div><br></div><div>Windows constants like "GUID_DEVINTERFACE_USB_DEVICE" should also be skipped. Through two layers of macros, it resolves to:</div><div><br></div><div>extern "C" const GUID __declspec(selectany) GUID_DEVINTERFACE_USB_DEVICE</div><div>    = { 0xA5DCBF10L, 0x6530, 0x11D2, { 0x90, 0x1F,  0x00,  0xC0,  0x4F,  0xB9,  0x51,  0xED } };<br></div><div><br></div><div>Can you spot the problem? It's a definition, and not a declaration. So there can't possibly be a symbol for it in an external library.</div><div><br></div><div>At the moment, jextract will generate code, which then fails with "unresolved symbol: GUID_DEVINTERFACE_USB_DEVICE". It clearly should be skipped.<br></div><div><br></div><div>To reproduce it:</div><div><br></div><div>windows_headers.h:</div><div>#include <windows.h><br>#include <initguid.h><br>#include <usbiodef.h><br></div><div><br></div><div><br></div><div>set SDK_DIR=C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0<br>jextract --source ^<br>  -D _AMD64_ -D _M_AMD64=100 -D UNICODE -D _UNICODE ^<br>  -I "%SDK_DIR%\um" ^<br>  -I "%SDK_DIR%\shared" ^<br>  --include-var GUID_DEVINTERFACE_USB_DEVICE ^<br>  windows_headers.h<br></div><div><br></div><div>BTW: "static inline" is a somewhat newer addition to C but it's plain C, isn't?</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 5, 2022 at 5:10 PM Maurizio Cimadamore <<a href="mailto:maurizio.cimadamore@oracle.com">maurizio.cimadamore@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
On 05/09/2022 12:30, Manuel Bleichenbacher wrote:<br>
> Is there a reason to treat inline static functions different from <br>
> function-like macros?<br>
<br>
IMHO they should be treated similarly - e.g. they should be skipped.<br>
<br>
Also, I thought jextract skipped stuff that was not plain C, so I'm <br>
surprised to see symbols being generated for "inline" functions. Maybe <br>
we're missing some checks?<br>
<br>
Maurizio<br>
<br>
</blockquote></div>