Don't try to hide Wdeprecated-copy when it doesn't exist.
authorCarl Hetherington <cth@carlh.net>
Mon, 27 Jul 2020 08:24:50 +0000 (10:24 +0200)
committerCarl Hetherington <cth@carlh.net>
Mon, 27 Jul 2020 08:24:50 +0000 (10:24 +0200)
src/lib/warnings.h

index f55f657..d182526 100644 (file)
 
 */
 
+#if __GNUC__ >= 9
 #define DCPOMATIC_DISABLE_WARNINGS \
   _Pragma("GCC diagnostic push") \
   _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \
   _Pragma("GCC diagnostic ignored \"-Wmissing-field-initializers\"") \
   _Pragma("GCC diagnostic ignored \"-Wdeprecated-copy\"") \
   _Pragma("GCC diagnostic ignored \"-Wunused-parameter\"")
+#else
+#define DCPOMATIC_DISABLE_WARNINGS \
+  _Pragma("GCC diagnostic push") \
+  _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \
+  _Pragma("GCC diagnostic ignored \"-Wmissing-field-initializers\"") \
+  _Pragma("GCC diagnostic ignored \"-Wunused-parameter\"")
+#endif
 
 #define DCPOMATIC_ENABLE_WARNINGS \
   _Pragma("GCC diagnostic pop")