1 // Test for a diagnostic about a usual deallocation function used as a
2 // placement deallocation function.  This will be a warning in C++98/11
3 // modes and an error in C++14 mode.
4 
5 // { dg-options "-Wc++14-compat" }
6 
7 #include <new>
new(std::size_t s,std::size_t)8 void *operator new (std::size_t s, std::size_t)
9 {
10   return operator new (s);
11 }
12 
delete(void * p,std::size_t)13 void operator delete (void *p, std::size_t) throw()
14 {
15   return ::operator delete (p);
16 }
17 
18 struct A
19 {
20   A();
21 };
22 
f()23 void f()
24 {
25   new (42) A;		// { dg-message "" }
26 }
27