Sergio Gómez Del Real sdelreal@codeweavers.com wrote:
- #include <pshpack2.h>
- struct test_data_normal {
const WCHAR *str;
const WCHAR *nfc;
const WCHAR *nfd;
const WCHAR *nfkc;
const WCHAR *nfkd;
- };
- #include <poppack.h>
What's the reason to pack this structure to 2 bytes?
Hi. If I understand correctly, that pragma option leaves no gaps between the fields. Later on I iterate over the structure through a WCHAR *, starting from nfc, so I need the guarantee of the fields being contiguously laid out without padding.
What kind of padding do you observe in ths case? Even in a pure theoretical case it's impossible to have a 2 bytes gap between pointers of either 4 (32-bit arch) or 8 bytes (64-bit arch) long.