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:
Martin Hořeňovský 2017-06-05 16:59:31 +02:00
parent 1e16be0b9e
commit b459bb4c43

View File

@ -55,6 +55,11 @@ TEST_CASE("#833") {
#pragma clang diagnostic push #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-function" #pragma clang diagnostic ignored "-Wunused-function"
#endif #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 // Test containing example where original stream insertable check breaks compilation
namespace { namespace {