From 5f21ea6739d9dae27a1c6ffe94ea28792f02124a Mon Sep 17 00:00:00 2001 From: Martin Sebor Date: Tue, 19 Jun 2018 17:30:47 +0000 Subject: [PATCH] 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 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/c-c++-common/attr-nonstring-8.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8aa3c65e200..04da05d23e1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2018-06-19 Martin Sebor + + 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 * g++.dg/lto/pr84805_0.C: Update template. diff --git a/gcc/testsuite/c-c++-common/attr-nonstring-8.c b/gcc/testsuite/c-c++-common/attr-nonstring-8.c index 15b68ed23a2..36ab2a66180 100644 --- a/gcc/testsuite/c-c++-common/attr-nonstring-8.c +++ b/gcc/testsuite/c-c++-common/attr-nonstring-8.c @@ -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" } */ } -- 2.30.2