diff options
author | Martin Sebor <msebor@redhat.com> | 2018-05-22 17:45:35 +0000 |
---|---|---|
committer | Martin Sebor <msebor@gcc.gnu.org> | 2018-05-22 11:45:35 -0600 |
commit | d677a8b6818b1682bfccae40cceb7264b53c1018 (patch) | |
tree | 8bcb9d057f75ddb91c415569f50789f538e99968 /gcc/ChangeLog | |
parent | 9b56ec1111632f4e9a47ba5388d7a65c19593f71 (diff) | |
download | gcc-d677a8b6818b1682bfccae40cceb7264b53c1018.zip gcc-d677a8b6818b1682bfccae40cceb7264b53c1018.tar.gz gcc-d677a8b6818b1682bfccae40cceb7264b53c1018.tar.bz2 |
PR c/85623 - strncmp() warns about attribute 'nonstring' incorrectly in -Wstringop-overflow
gcc/ChangeLog:
PR c/85623
* calls.c (maybe_warn_nonstring_arg): Use string length to set
or ajust the presumed bound on an operation to avoid unnecessary
warnings.
gcc/testsuite/ChangeLog:
PR c/85623
* c-c++-common/attr-nonstring-3.c: Adjust.
* c-c++-common/attr-nonstring-4.c: Adjust.
* c-c++-common/attr-nonstring-6.c: New test.
From-SVN: r260541
Diffstat (limited to 'gcc/ChangeLog')
-rw-r--r-- | gcc/ChangeLog | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 12a305c..3dc0566 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -42,6 +42,13 @@ 2018-05-22 Martin Sebor <msebor@redhat.com> + PR c/85623 + * calls.c (maybe_warn_nonstring_arg): Use string length to set + or ajust the presumed bound on an operation to avoid unnecessary + warnings. + +2018-05-22 Martin Sebor <msebor@redhat.com> + PR tree-optimization/85826 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid assuming that a DECL necesarily has a constant size. |