Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8252899

jextract can't handle multiple extern declarations that have the same name, but a different type name

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • None
    • repo-panama
    • tools

    Description

      For the following header:

          typedef int MyInt;

          extern const int x;
          extern const MyInt x;

      Extracting results in errors like:

          java.lang.RuntimeException: In memory compilation failed: warning: using incubating module(s): jdk.incubator.foreign
          org/jextract/test_h.java:29: error: method x$LAYOUT() is already defined in class test_h
              public static MemoryLayout x$LAYOUT() {
                                                           ^

      Note that if chaning MyInt to int for the second declaration makes it work.

      Attachments

        Issue Links

          Activity

            People

              jvernee Jorn Vernee
              jvernee Jorn Vernee
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: