Leak full Wparentheses suppression for GCC 9

Reported as an issue on Discord. I thought that by GCC 9, the
C++ frontend was fixed enough to support `_Pragma`-based
suppression correctly, but apparently I was wrong.
This commit is contained in:
Martin Hořeňovský 2022-05-31 23:57:02 +02:00
parent 8c952bd076
commit cca5923502
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A

View File

@ -14,9 +14,9 @@
#include <catch2/internal/catch_stringref.hpp> #include <catch2/internal/catch_stringref.hpp>
#include <catch2/internal/catch_source_line_info.hpp> #include <catch2/internal/catch_source_line_info.hpp>
// We need this suppression to leak, because it took until GCC 9 // We need this suppression to leak, because it took until GCC 10
// for the front end to handle local suppression via _Pragma properly // for the front end to handle local suppression via _Pragma properly
#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && __GNUC__ < 9 #if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && __GNUC__ <= 9
#pragma GCC diagnostic ignored "-Wparentheses" #pragma GCC diagnostic ignored "-Wparentheses"
#endif #endif