Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/cpp1y/sized-dealloc2.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// Test for a diagnostic about a usual deallocation function used as a // placement deallocation function. This will be a warning in C++98/11 // modes and an error in C++14 mode. // { dg-options "-Wc++14-compat" } #include <new> void *operator new (std::size_t s, std::size_t) { return operator new (s); } void operator delete (void *p, std::size_t) throw() { return ::operator delete (p); } struct A { A(); }; void f() { new (42) A; // { dg-message "" } }