<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p>I think this is an issue with the newer versions of LLVM. I
      remember seeing this in the past as well. It should work with LLVM
      version 13.0.0 though.</p>
    <p>Jorn</p>
    <p></p>
    <div class="moz-cite-prefix">On 29/05/2023 16:18, Maurizio
      Cimadamore wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:4086217a-7d29-6aae-8888-aa5695060198@oracle.com">
      
      <p><br>
      </p>
      <div class="moz-cite-prefix">On 29/05/2023 09:40, Maurizio
        Cimadamore wrote:<br>
      </div>
      <blockquote type="cite" cite="mid:00e6c372-aa62-a741-23ed-4a71f123aa5f@oracle.com">
        <blockquote type="cite" cite="mid:CAEwKcDK-CbRUSjixyg=+9JF4i-8nHhq80YdonYZ2-ggcyKRP_Q@mail.gmail.com">
          <div dir="ltr">
            <div>First off I noticed a bug in jextract, it appears that
              in an anonymous union the location will be dumped into the
              name field, which is invalid on windows. The backslashes
              need to be escaped.</div>
            <div>.withName("union (anonymous at
              C:\Users\Clayton\.jdks\openjdk-20.0.1\include\win32\jawt_md.h:42:5)"),</div>
            <div>I came across this when generating bindings to jawt on
              windows. Not sure if it makes sense to include that path
              or not but I was able to get around it by adding a
              Utils.quote call to Constants.java#340, like
              so append(".withName(\"" + Utils.quote(<a href="https://urldefense.com/v3/__http://l.name__;!!ACWV5N9M2RV99hQ!NZzKVdwoqGo5oDo6E4dLPZ7wZ5GFmFyiaSyGJk4cnIuOIOLfZ5PJL3wOxRylvOSOK-dvRUbJ2aHvsD1hLpnVPww8NZZmWkOH4w$" moz-do-not-send="true">l.name</a>().get()) + "\")");</div>
          </div>
        </blockquote>
        That seems indeeed a bug - thanks</blockquote>
      <p>I'm doing some tests with a simple anon union:</p>
      <p>```<br>
        struct A {<br>
           int x;<br>
           union {<br>
              int a;<br>
              int b;<br>
           };<br>
        };<br>
        ```</p>
      <p>This does not create the issue you reported - as the anon union
        gets named "$anon$0" (as it should be).</p>
      <p>I have also tried to extract jawt_md.h using jextract 20 here:</p>
      <p><a class="moz-txt-link-freetext" href="https://jdk.java.net/jextract/" moz-do-not-send="true">https://jdk.java.net/jextract/</a></p>
      <p>And I can't see the odd name you are referring to. Is it
        possible you are using an older jextract version?</p>
      <p>Maurizio<br>
      </p>
    </blockquote>
  </body>
</html>