From: nhmall Date: Wed, 3 Feb 2021 14:22:57 +0000 (-0500) Subject: extend the Qt clang fix pertaining to shadowing of global variables to g++ X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b1e5c99906480976bac309cd2f15c2a453b22f82;p=nethack extend the Qt clang fix pertaining to shadowing of global variables to g++ --- diff --git a/win/Qt/qt_post.h b/win/Qt/qt_post.h index a63122f43..e791ce622 100644 --- a/win/Qt/qt_post.h +++ b/win/Qt/qt_post.h @@ -8,6 +8,8 @@ #ifdef __clang__ #pragma clang diagnostic pop -#endif /* __clang__ */ +#elif defined(__GNUC__) && defined(__cplusplus) +#pragma GCC diagnostic pop +#endif /* OS-specific bits */ /*qt_post.h*/ diff --git a/win/Qt/qt_pre.h b/win/Qt/qt_pre.h index e3dcdde0d..70f30a8fc 100644 --- a/win/Qt/qt_pre.h +++ b/win/Qt/qt_pre.h @@ -22,6 +22,9 @@ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wshadow" +#elif defined(__GNUC__) && defined(__cplusplus) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wshadow" #endif /*qt_pre.h*/