Commit 39f901e9 by Jonathan Wakely Committed by Jonathan Wakely

Fix AIX test failure due to replacement operator delete

On AIX the sized delete defined in the library will call the non-sized
delete defined in the library, not the replacement version defined in
the test file. By also replacing sized delete we make the test pass
everywhere.

	* testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
	failure on AIX.

From-SVN: r272391
parent 35d57c95
2019-06-17 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
failure on AIX.
* include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
PR libstdc++/90281 Fix string conversions for filesystem::path
......
......@@ -24,6 +24,12 @@
#include <cstdlib>
#include <testsuite_hooks.h>
#if __cplusplus >= 201103L
# define NOTHROW noexcept
#else
# define NOTHROW throw()
#endif
struct gnu { };
bool check_new = false;
......@@ -36,12 +42,19 @@ operator new(std::size_t n) THROW(std::bad_alloc)
return std::malloc(n);
}
void operator delete(void *v) throw()
void operator delete(void *v) NOTHROW
{
check_delete = true;
return std::free(v);
}
#if __cpp_sized_deallocation
void operator delete(void *v, std::size_t) NOTHROW
{
::operator delete(v);
}
#endif
void test01()
{
std::allocator<gnu> obj;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment