[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: [rtl] gcc and g++ mbuff confusion. __attribute__((pac



>typedef     unsigned short uint16;  /* sizeof (uint16) must == 2 */
>typedef     unsigned int uint32;    /* sizeof (uint32) must == 4 */
>
>typedef struct {
>  char c;
>  uint32 ui32;
>  struct {
>    uint16 ui16[2];
>  } s1_t;
>} x1_t;
>
>typedef struct {
>  char c;
>  uint32 ui32;
>  struct  s2 {
>    uint16 ui16[2];
>  };
>} x2_t;

s1_t is a declaration which allocates 4 bytes of storage. S2 is only a tag (like
a typedef) so I assume it did not allocate any storage. Can you reference
x2_t.s2 or does it give a "no such member" error? Try compiling with -S and look
at assembler code.