r260541 - in /trunk/gcc: ChangeLog calls.c test...

msebor@gcc.gnu.org msebor@gcc.gnu.org
Tue May 22 17:46:00 GMT 2018


Author: msebor
Date: Tue May 22 17:45:35 2018
New Revision: 260541

URL: https://gcc.gnu.org/viewcvs?rev=260541&root=gcc&view=rev
Log:
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.


Added:
    trunk/gcc/testsuite/c-c++-common/attr-nonstring-6.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/calls.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/c-c++-common/attr-nonstring-3.c
    trunk/gcc/testsuite/c-c++-common/attr-nonstring-4.c



More information about the Gcc-cvs mailing list