From 6f9390306dcdccd1478eca6febebc4af4c42377d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 30 Aug 2020 23:52:32 +0200 Subject: [PATCH] Disable -Wsuggest-final-xxx in the headers for now We don't use "final" in our code, as very few classes in wx code have virtual functions but are not meant to be derived from in the user code. Ideal would be to check the existing warnings and maybe apply "final" if it's relevant and disable it otherwise, as these warnings can be useful to build the application code with, but for now just disable them in the test suite. --- tests/allheaders.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/allheaders.cpp b/tests/allheaders.cpp index 192eb91b75..51a20cab45 100644 --- a/tests/allheaders.cpp +++ b/tests/allheaders.cpp @@ -368,6 +368,13 @@ GCC_TURN_OFF(zero-as-null-pointer-constant) #endif + // These ones could be useful to explore, but for now we don't use "final" + // at all anywhere. +#if CHECK_GCC_VERSION(5,1) + GCC_TURN_OFF(suggest-final-methods) + GCC_TURN_OFF(suggest-final-types) +#endif // 5.1 + // wxWARNING_SUPPRESS_MISSING_OVERRIDE() inside wxRTTI macros is just // ignored by gcc up to 9.x for some reason, so we have no choice but to // disable it.