mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
Silence GCC's Wunused-function firing in compilation tests
The whole GCC kinda sucks around warnings, this is yet another place where pragmas manipulating warnings don't work properly and thus a warning has to be disabled globally... luckily, this time it is happening in selftest file and thus it isn't too problematic to just turn that warning of for the entire file.
This commit is contained in:
parent
1e16be0b9e
commit
b459bb4c43
@ -55,6 +55,11 @@ TEST_CASE("#833") {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-function"
|
||||
#endif
|
||||
#ifdef __GNUC__
|
||||
// Note that because -~GCC~-, this warning cannot be silenced temporarily, by pushing diagnostic stack...
|
||||
// Luckily it is firing in test files and thus can be silenced for the whole file, without losing much.
|
||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||
#endif
|
||||
|
||||
// Test containing example where original stream insertable check breaks compilation
|
||||
namespace {
|
||||
|
Loading…
Reference in New Issue
Block a user