Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7903609

Jextract can not handle some anonymous nested structs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • None
    • None
    • tools
    • None

      For example, for a struct like this:

      struct Foo {
          char c;
          struct {
              int: 32;
              struct {
                  int: 32;
                  int x;
              };
          };
      };

      We can not find the offset of the anonymous nested structs, even though we have a named field in there that a user might want to access.

      Since we determine the offset of an anonymous struct by looking at the first field, we have to bail out when the first field is not named (as looking up offsets of unnamed field is not supported by libclang).

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

              Created:
              Updated:
              Resolved: