https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119312
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- CCing Joseph for C legalese, but if the whole struct isn't const, I wonder if it isn't valid to just void foo (struct S *s) { struct S y = { ... }; *s = y; } Or if e.g. code can't validly change at least padding (if any) in the structure even if all the members are const. struct S { const char a[3]; const int b; const char c[3]; };