diff --git a/test/async_cobalt_test.cpp b/test/async_cobalt_test.cpp index 4985acf..015879c 100644 --- a/test/async_cobalt_test.cpp +++ b/test/async_cobalt_test.cpp @@ -57,6 +57,15 @@ std::span bytes_of(std::string_view text) { return {reinterpret_cast(text.data()), text.size()}; } +// GCC 14 warns that each promise below, a coroutine, frees its frame with an operator delete that +// does not pair with the operator new that made it (-Wmismatched-new-delete); the pair is +// Boost.Cobalt's own, from its promise_memory_resource_base, and GCC 15 does not warn +// (boostorg/cobalt#7). +#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ == 14 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmismatched-new-delete" +#endif + // The cheap functions, each awaited, against the synchronous function; and a refusal (an output of // 0 bytes) through as_tuple, and with exceptions through a throw. cobalt::promise cheap() { @@ -135,6 +144,10 @@ cobalt::promise browser() { } #endif +#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ == 14 +#pragma GCC diagnostic pop +#endif + // Runs the context until `done`, a promise started on it, is ready, and reads it. void complete(webcpp::asio::io_context& context, cobalt::promise& done) { context.restart();