[PATCH 4/4] Fix undefined behaviour in libstdc++ testsuite

Jonathan Wakely jwakely@redhat.com
Thu Jul 21 19:49:00 GMT 2016


This fixes a couple of places where we replaced operator delete(void*)
but not the version that was needed by the tests (the first case used
to be correct, but was broken by the sized deallocation change in
C++14, so uses the feature-test macro to decide whether the extra
overload is needed).

    Define missing delete operators in libstdc++ testsuite
    
    	* testsuite/23_containers/vector/zero_sized_allocations.cc:
    	Define sized deallocation function.
    	* testsuite/util/testsuite_new_operators.h:
    	(operator delete(void*, const std::nothrow_t&)): Define nothrow
    	deallocation function.

Tested powerpc64-linux, committed to trunk.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 2101 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20160721/425a7e2d/attachment.bin>


More information about the Libstdc++ mailing list