object-introspection icon indicating copy to clipboard operation
object-introspection copied to clipboard

Pointers to anonymous structs are stubbed out even with `--chase-raw-pointers`

Open JakeHillion opened this issue 3 years ago • 0 comments

A stubbed pointer (char[8]) is generated for an anonymous struct pointer even with --chase-raw-pointers enabled.

Actual code:

struct Node {
    int a, b, c;
  };
struct AnonStructPtrContainer {
    struct { struct Node *node; } *anon;
  };

Generated code:

// stubbed classes -----
struct alignas(8) __anon_struct_0_ { char dummy[8];};
// struct definitions -----
struct AnonStructPtrContainer{
/* 8         |     8 */__anon_struct_0_ anon;
};

### Affected tests

  • OidIntegration.anonymous_anon_struct_ptr
  • OilIntegration.anonymous_anon_struct_ptr

JakeHillion avatar Jan 03 '23 13:01 JakeHillion