PR c++/56973, DR 696 - capture constant variables only as needed.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / sized-dealloc2.C
blob0a76cdccd3294e0cee9fc682a0d0cd54c052a175
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.
5 // { dg-options "-Wc++14-compat" }
7 #include <new>
8 void *operator new (std::size_t s, std::size_t)
10   return operator new (s);
13 void operator delete (void *p, std::size_t) throw()
15   return ::operator delete (p);
18 struct A
20   A();
23 void f()
25   new (42) A;           // { dg-message "" }