jckarter/clay — Issue #67: bindgen: incomplete generation of struct containing anonymous union
Author: Blei
Created: 2011-12-17 16:47:04+00:00
State: open

The following struct from gst/gstmessage.h:

```c
struct _GstMessage
{
GstMiniObject mini_object;

/*< private >*//* with MESSAGE_LOCK */
GMutex *lock; /* lock and cond for async delivery */
GCond *cond;

/*< public > *//* with COW */
GstMessageType type;
guint64 timestamp;
GstObject *src;

GstStructure *structure;

/*< private >*/
union {
struct {
guint32 seqnum;
} ABI;
/* + 0 to mark ABI change for future greppage */
gpointer _gst_reserved[GST_PADDING + 0];
} abidata;
};
```

gets generated as:

```
record Struct__GstMessage (
mini_object : GstMiniObject,
lock : Pointer[GMutex],
cond : Pointer[GCond],
type : GstMessageType,
timestamp : guint64,
src : Pointer[GstObject],
structure : Pointer[GstStructure],
abidata : Union_Unnamed44,
);
```

without any mention of a `Union_Unnamed44` anywhere else.