]> granicus.if.org Git - nethack/commitdiff
extend the Qt clang fix pertaining to shadowing of global variables to g++
authornhmall <nhmall@nethack.org>
Wed, 3 Feb 2021 14:22:57 +0000 (09:22 -0500)
committernhmall <nhmall@nethack.org>
Wed, 3 Feb 2021 14:22:57 +0000 (09:22 -0500)
win/Qt/qt_post.h
win/Qt/qt_pre.h

index a63122f435ddfd93d3f0e713ec3f1e6fb54f3cdc..e791ce62284a6c9e733e99c259f262485e5dd186 100644 (file)
@@ -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*/
index e3dcdde0d405fbfe9c2bf2d995a6141d28ed557b..70f30a8fccf9298ff9c41683287dc0ec04acaaa5 100644 (file)
@@ -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*/