jextract generates uncompilable code when C identifier with the name from "java.lang" classes is used

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • None
    • Affects Version/s: None
    • Component/s: tools
    • None

      This was reported in jextract-dev

      https://mail.openjdk.org/pipermail/jextract-dev/2024-July/001843.html

      boolean.h from the email is as follows:

      typedef enum
      {
          Boolean
      } MyTypes;

      jextracted file results in compilation error:

      $ javac boolean_h.java
      boolean_h.java:20: error: illegal forward reference
          static final boolean TRACE_DOWNCALLS = Boolean.getBoolean("jextract.trace.downcalls");
                                                 ^
      boolean_h.java:20: error: int cannot be dereferenced
          static final boolean TRACE_DOWNCALLS = Boolean.getBoolean("jextract.trace.downcalls");
                                                        ^
      2 errors

            Assignee:
            Sundararajan Athijegannathan
            Reporter:
            Sundararajan Athijegannathan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: