4 ms·
> in C you kinda just have compiler flags, and maybe __attribute__-s if you can spare some verbosity Which you can use to wrap the unaligned type as a packed s
by lights0123 3y ago
> in C you kinda just have compiler flags, and maybe __attribute__-s if you can spare some verbosity
Which you can use to wrap the unaligned type as a packed struct, i.e.
struct __attribute__((__packed__)) unaligned_int { int i; };
which has an alignment of 1.