diff --git a/test/null_resource.cpp b/test/null_resource.cpp index 71cb479cd..5b1b17501 100644 --- a/test/null_resource.cpp +++ b/test/null_resource.cpp @@ -28,8 +28,15 @@ class null_resource_test mr.allocate(16), std::bad_alloc); char buf[128]; +#if defined(BOOST_GCC) && BOOST_GCC >= 160000 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wfree-nonheap-object" +#endif // no-op mr.deallocate(&buf[0], 128); +#if defined(BOOST_GCC) && BOOST_GCC >= 160000 +# pragma GCC diagnostic pop +#endif BOOST_TEST( mr == *get_null_resource()); }