From ba81960352892d52ec7a1efc381697a8656b12e7 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 10 Sep 2025 21:53:22 +0200 Subject: [PATCH] Helgrind regtest: use older C++ dialect for bug392331.cpp Old versions of GCC (like 6.3) claim some C++17 support but apparently not CTAD https://en.cppreference.com/w/cpp/language/class_template_argument_deduction.html So, go backwards and explicitly give the std::mutex template type for the locks. --- helgrind/tests/bug392331.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helgrind/tests/bug392331.cpp b/helgrind/tests/bug392331.cpp index ff26883b76..bd6cc5a236 100644 --- a/helgrind/tests/bug392331.cpp +++ b/helgrind/tests/bug392331.cpp @@ -16,7 +16,7 @@ bool processed = false; void worker_thread() { // Wait until main() sends data - std::unique_lock lk(m); + std::unique_lock lk(m); cv.wait(lk, []{return ready;}); // after the wait, we own the lock. @@ -40,7 +40,7 @@ int main() data = "Example data"; // send data to the worker thread { - std::lock_guard lk(m); + std::lock_guard lk(m); ready = true; std::cout << "main() signals data ready for processing\n"; } @@ -48,7 +48,7 @@ int main() // wait for the worker { - std::unique_lock lk(m); + std::unique_lock lk(m); cv.wait(lk, []{return processed;}); } std::cout << "Back in main(), data = " << data << '\n'; -- 2.47.3