c2hsc icon indicating copy to clipboard operation
c2hsc copied to clipboard

Anonymous unions within structs seem to not work

Open vikstrous opened this issue 10 years ago • 0 comments

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.

vikstrous avatar Apr 07 '15 19:04 vikstrous