https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100920
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Eric Botcazou <ebotca...@gcc.gnu.org>: https://gcc.gnu.org/g:a589877a0036fc2f66b7a957859940c53efdc7c9 commit r12-1242-ga589877a0036fc2f66b7a957859940c53efdc7c9 Author: Eric Botcazou <ebotca...@adacore.com> Date: Sun Jun 6 11:37:45 2021 +0200 Fix thinko in new warning on type punning for storage order purposes In C, unlike in Ada, the storage order of arrays is that of their component type, so you need to look at it when deciding to warn. And the PR complains about a bogus warning on the assignment of a pointer returned by alloca or malloc, so this also fixes that. gcc/c PR c/100920 * c-decl.c (finish_struct): Fix thinko in previous change. * c-typeck.c (convert_for_assignment): Do not warn on pointer assignment and initialization for storage order purposes if the RHS is a call to a DECL_IS_MALLOC function. gcc/testsuite/ * gcc.dg/sso-14.c: New test.