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.
gcc/testsuite/ChangeLog:
PR testsuite/98566
* g++.dg/warn/Wmismatched-dealloc.C: Use target c++14 in
dg-error.
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*);