<div dir="ltr"><div>You are right - I have old LLVM 9.0.0. I shall upgrade. Thanks for checking.<br></div><div><br></div><div>Big thank you to everyone involved with work for JDK22 - the new generated
code
is tidier and nice without $get/set. So far all my Windows apps work fine after making a few changes in my code to match the new structure. <br></div><div><br></div><div>I do have another issue with the unrealistic code generation case - that is when using raw windows headers without --include-xxxx filtering. I'll report back if it is an issue once I've updated LLVM and studied it more. I only use that when trying out new APIs.<br></div><div><br></div><div>Dunc<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 14 Feb 2024 at 19:05, 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"><u></u>
<div>
<p>Hi Duncan,<br>
thanks for the report. I think the problem here is that we have
updated jextract to use libclang directly for generating these
comment.</p>
<p>Now, in libclang 13, we get something like "unnamed union ...".
We look for that string in the jextract code, and if we see that,
we generate a more succinct comment.</p>
<p>But you are running either a newer, or an older version, and it
seems like instead of saying "unnamed" you get "anonymous"
instead, which jextract is not looking for :-)</p>
<p>So... we should probably make that logic/regex more robust.</p>
<p>Maurizio<br>
</p>
<div>On 14/02/2024 16:42, Duncan Gittins
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>
I've just pulled the latest jextract master branch (I think!),
and re-run my build for JDK22 on Windows. <br>
</div>
<div><br>
</div>
<div>
Please ignore if you are mid-way though any fixes or already
known issue. There appears to be a glitch with the snippet
generation.
If any
component of an include file starts with "u", it is treated as
an invalid \uXXXX character sequence by javac
</div>
<div><br>
</div>
<div>
<div style="background-color:rgb(255,255,255);padding:0px 0px 0px 2px">
<div style="color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:"Consolas";font-size:10pt;white-space:pre-wrap"><p style="margin:0px"> /**
* Setter for field:
* {@snippet lang=c :
* union (anonymous union at C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\winnt.h:16446:5) Flags
* }
*/
</p><p style="margin:0px">
</p><p style="margin:0px">PROCESSOR_IDLESTATE_POLICY.java:222: error: illegal unicode escape
[javac] * union (anonymous union at C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\winnt.h:16446:5) Flags
[javac]</p><p style="margin:0px">
</p></div>
</div>
</div>
<div>It's from jextract without symbol filters, but not on any
definitions I use:</div>
<div> <br>
</div>
<div> #include <shlobj_core.h><br>
#include <objbase.h></div>
<div><br>
</div>
<div>Kind regards</div>
<div><br>
</div>
<div>Duncan<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
</blockquote>
</div>
</blockquote></div>