diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2021-06-07 18:17:31 +0200 |
---|---|---|
committer | Eric Botcazou <ebotcazou@adacore.com> | 2021-06-07 18:22:29 +0200 |
commit | 97d83259b91fb558f5b09bfb09529900f585c4c9 (patch) | |
tree | 056bbb7001ac9840e7ea501389fd4e2b580988bf /gcc/c | |
parent | 6cb35b606c39d5f21f3298c77bfbcaaef3fbc872 (diff) | |
download | gcc-97d83259b91fb558f5b09bfb09529900f585c4c9.zip gcc-97d83259b91fb558f5b09bfb09529900f585c4c9.tar.gz gcc-97d83259b91fb558f5b09bfb09529900f585c4c9.tar.bz2 |
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.
gcc/testsuite/
* gcc.dg/sso-14.c: Adjust.
Diffstat (limited to 'gcc/c')
-rw-r--r-- | gcc/c/c-typeck.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c index daa2e12..845d50f 100644 --- a/gcc/c/c-typeck.c +++ b/gcc/c/c-typeck.c @@ -7303,7 +7303,7 @@ convert_for_assignment (location_t location, location_t expr_loc, tree type, /* Do not warn for built-in functions, for example memcpy, since we control how they behave and they can be useful in this area. */ if (TREE_CODE (rname) != FUNCTION_DECL - || !DECL_IS_UNDECLARED_BUILTIN (rname)) + || !fndecl_built_in_p (rname)) warning_at (location, OPT_Wscalar_storage_order, "passing argument %d of %qE from incompatible " "scalar storage order", parmnum, rname); |