]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/gimple-fold.c
PR c/85365 - -Wrestrict false positives with -fsanitize=undefined
authorMartin Sebor <msebor@redhat.com>
Fri, 20 Apr 2018 23:43:51 +0000 (23:43 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Fri, 20 Apr 2018 23:43:51 +0000 (17:43 -0600)
commit8cd95cec0f5bde4d78dd26778f6070b3bdda6672
treee2c3ae88ecc8a5de23f062a8f185c0f70860ae17
parent661eb8f9e5270df79c21601273219e2a8e282204
PR c/85365 -  -Wrestrict false positives with -fsanitize=undefined

gcc/ChangeLog:

PR c/85365
* gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
for null pointers.
(gimple_fold_builtin_stxcpy_chk): Same.
* gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.

gcc/testsuite/ChangeLog:

PR c/85365
* gcc.dg/Wrestrict-15.c: New test.

From-SVN: r259535
gcc/ChangeLog
gcc/gimple-fold.c
gcc/gimple-ssa-warn-restrict.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Wrestrict-15.c [new file with mode: 0644]