From 978c5b72aae69b95d969b968ceb7269126b77a26 Mon Sep 17 00:00:00 2001 From: abhishekbelgaonkar23 <155880197+abhishekbelgaonkar23@users.noreply.github.com> Date: Sat, 16 Nov 2024 13:48:26 +0530 Subject: [PATCH] Update catch_template_test_macros.hpp --- src/catch2/catch_template_test_macros.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/catch2/catch_template_test_macros.hpp b/src/catch2/catch_template_test_macros.hpp index 6762eb18..80b542bc 100644 --- a/src/catch2/catch_template_test_macros.hpp +++ b/src/catch2/catch_template_test_macros.hpp @@ -6,7 +6,10 @@ // SPDX-License-Identifier: BSL-1.0 #ifndef CATCH_TEMPLATE_TEST_MACROS_HPP_INCLUDED #define CATCH_TEMPLATE_TEST_MACROS_HPP_INCLUDED - +// We need this suppression to leak, because it took until GCC 10 +// for the front end to handle local suppression via _Pragma properly +// inside templates (so `TEMPLATE_TEST_CASE` and co). +// **THIS IS DIFFERENT FOR STANDARD TESTS, WHERE GCC 9 IS SUFFICIENT** #if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && __GNUC__ < 10 #pragma GCC diagnostic ignored "-Wparentheses" #endif