]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix old thinko in warning on pointer for storage order purposes
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 9 Jun 2021 10:37:47 +0000 (12:37 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Wed, 9 Jun 2021 10:39:52 +0000 (12:39 +0200)
commit5be418dc591014b1773d59abca8fba5be34df618
treecc86267acfc49e8b429ba7bbdc42ea723965260a
parent5a9b6a004f89fdd95b0470e1324dc4dee8c41d24
Fix old thinko in warning on pointer for storage order purposes

gcc/c
PR c/100920
* c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
spot built-in functions. 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.
gcc/c/c-typeck.c
gcc/testsuite/gcc.dg/sso-14.c [new file with mode: 0644]