Re: need help to redefine packed c struct in d

2024-09-28 Thread Dakota via Digitalmars-d-learn
On Saturday, 28 September 2024 at 08:35:39 UTC, Johan wrote: On Saturday, 28 September 2024 at 07:54:40 UTC, Dakota wrote: ```c struct __attribute__((packed)) type1 { uint32_tu32; uint8_t u8; uint16_tu16a; uint16_tu16b; uint8_t u8a;

Re: need help to redefine packed c struct in d

2024-09-28 Thread Johan via Digitalmars-d-learn
On Saturday, 28 September 2024 at 07:54:40 UTC, Dakota wrote: ```c struct __attribute__((packed)) type1 { uint32_tu32; uint8_t u8; uint16_tu16a; uint16_tu16b; uint8_t u8a; uint8_t arr[14]; }; ``` the struct size in C is 24: