re PR middle-end/85602 (-Wsizeof-pointer-memaccess for strncat with size of source)

gcc/testsuite/ChangeLog:

	PR middle-end/85602
	* c-c++-common/attr-nonstring-8.c: Adjust text of expected warning
	to also match C++.

From-SVN: r261751
This commit is contained in:
Martin Sebor 2018-06-19 17:30:47 +00:00 committed by Martin Sebor
parent 828d64499e
commit 5f21ea6739
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2018-06-19 Martin Sebor <msebor@redhat.com>
PR middle-end/85602
* c-c++-common/attr-nonstring-8.c: Adjust text of expected warning
to also match C++.
2018-06-19 Jan Hubicka <hubicka@ucw.cz>
* g++.dg/lto/pr84805_0.C: Update template.

View file

@ -60,7 +60,7 @@ void test_strncat_nonstring_cst (char *d)
T (strncat (nd3, ns3, 4)); /* { dg-warning "argument 2 declared attribute .nonstring. is smaller than the specified bound 4" } */
/* { dg-warning "specified bound 4 exceeds destination size 3" "" { target *-*-* } .-1 } */
T (strncat (d, pns, sizeof pns)); /* { dg-warning "argument to .sizeof. in .strncat. call is the same expression as the source" } */
T (strncat (d, pns, sizeof pns)); /* { dg-warning "argument to .sizeof. in .\[^\n\r\]*strncat\[^\n\r\]*. call is the same expression as the source" } */
}