jwiegley / c2hsc

Utility for creating .hsc files from C API header files
BSD 3-Clause "New" or "Revised" License
26 stars 15 forks source link

Anonymous unions within structs seem to not work #23

Open vikstrous opened 9 years ago

vikstrous commented 9 years ago

Example from binutils include/elf/external.h:

typedef struct {
  unsigned char d_tag[4];   /* entry tag value */
  union {
    unsigned char d_val[4];
    unsigned char d_ptr[4];
  } d_un;
} Elf32_External_Dyn;

I got compile errors when trying to use this header. When I commented out this struct and one more with a union it worked.