Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorMartin Hořeňovský2020-09-06 16:02:01 +0200
committerMartin Hořeňovský2020-09-06 16:02:01 +0200
commit9155a9ff204853abca9048a76cad1b01f8db3a25 (patch)
tree939a7484df62b04dc9f7b22a285f25080b685005 /src
parentcc18bd719da38e5415909f5b10199395f00076e6 (diff)
downloadcatch3-9155a9ff204853abca9048a76cad1b01f8db3a25.tar.gz
Fix -Wparentheses issue on g++9
Diffstat (limited to 'src')
-rw-r--r--src/catch2/catch_template_test_macros.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/catch2/catch_template_test_macros.hpp b/src/catch2/catch_template_test_macros.hpp
index 12917031..66b1bc4d 100644
--- a/src/catch2/catch_template_test_macros.hpp
+++ b/src/catch2/catch_template_test_macros.hpp
@@ -8,6 +8,15 @@
#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
+
+
#include <catch2/catch_test_macros.hpp>
#include <catch2/internal/catch_template_test_registry.hpp>
#include <catch2/internal/catch_preprocessor.hpp>