diff mbox series

[pushed] c++: Fix g++.dg/warn/Wmismatched-dealloc.C for C++11 [PR98566]

Message ID 20210106172510.57866-1-polacek@redhat.com
State New
Headers show
Series [pushed] c++: Fix g++.dg/warn/Wmismatched-dealloc.C for C++11 [PR98566] | expand

Commit Message

Marek Polacek Jan. 6, 2021, 5:25 p.m. UTC
C++ sized deallocation only came in C++14, so this test wasn't
working properly in C++11, which isn't tested by default.  Fixed
thus by constraining the dg-errors to C++14 only.

Tested x86_64-pc-linux-gnu, applying to trunk.

gcc/testsuite/ChangeLog:

	PR testsuite/98566
	* g++.dg/warn/Wmismatched-dealloc.C: Use target c++14 in
	dg-error.
---
 gcc/testsuite/g++.dg/warn/Wmismatched-dealloc.C | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


base-commit: 6d0b075d662e277a9847f7e8c17d34e7866f0cec
diff mbox series

Patch

diff --git a/gcc/testsuite/g++.dg/warn/Wmismatched-dealloc.C b/gcc/testsuite/g++.dg/warn/Wmismatched-dealloc.C
index 682db6f02cb..3072e240e28 100644
--- a/gcc/testsuite/g++.dg/warn/Wmismatched-dealloc.C
+++ b/gcc/testsuite/g++.dg/warn/Wmismatched-dealloc.C
@@ -12,9 +12,9 @@  void* A (mydealloc, 2) myalloc (void*);
 
 
 void* A (operator delete, 1)
-  bad_new (size_t);                     // { dg-error "attribute argument 1 is ambiguous" }
+  bad_new (size_t);                     // { dg-error "attribute argument 1 is ambiguous" "" { target c++14 } }
 void* A (operator delete[], 1)
-  bad_array_new (size_t);               // { dg-error "attribute argument 1 is ambiguous" }
+  bad_array_new (size_t);               // { dg-error "attribute argument 1 is ambiguous" "" { target c++14 } }
 
 void my_delete (const char*, void*);
 void my_array_delete (const char*, void*);