https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51628

--- Comment #44 from Sven <sven.koehler at gmail dot com> ---
(In reply to Alexey Salmin from comment #42)
> typedef struct unaligned_int128_t_ {
>     __int128_t value;
> } __attribute__((packed)) unaligned_int128_t;

You can combine the packed attribute with the aligned attribute. Then you can
define one struct with aligned(4) and one with aligned(8). Does the warning
trigger if you cast between those types? Or does the cast simply override the
warning because it's now the programmers responsibility to make sure that the
alignment is correct?

Reply via email to