summaryrefslogtreecommitdiff
path: root/TestPrograms
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2020-08-06 21:11:00 -0400
committerJeffrey Walton <noloader@gmail.com>2020-08-06 21:11:00 -0400
commit47b38d8a6bcbb63bf0b9ad520198bb8eab2b8241 (patch)
treeb408e2c64ef9db6c900972ad6175fb80a0644433 /TestPrograms
parentd5ef8b8b174c4446524c710fcdebb3b3475776dd (diff)
downloadcryptopp-git-47b38d8a6bcbb63bf0b9ad520198bb8eab2b8241.tar.gz
Fix warning suppression macros in test programs
Diffstat (limited to 'TestPrograms')
-rw-r--r--TestPrograms/test_cxx11_noexcept.cxx6
-rw-r--r--TestPrograms/test_ppc_power7.cxx6
-rw-r--r--TestPrograms/test_ppc_power8.cxx6
-rw-r--r--TestPrograms/test_ppc_power9.cxx6
4 files changed, 16 insertions, 8 deletions
diff --git a/TestPrograms/test_cxx11_noexcept.cxx b/TestPrograms/test_cxx11_noexcept.cxx
index 5be9d597..a6c70b81 100644
--- a/TestPrograms/test_cxx11_noexcept.cxx
+++ b/TestPrograms/test_cxx11_noexcept.cxx
@@ -1,10 +1,12 @@
-#if defined(__GNUC_MAJOR__)
-# define GNUC_VERSION (__GNUC__*1000 + __GNUC_MAJOR__*10)
+#if defined(__GNUC__)
+# define GNUC_VERSION (__GNUC__*1000 + __GNUC_MINOR__*10)
#endif
#if defined(__clang_major__) && defined(__apple_build_version__)
+# undef GNUC_VERSION
# define APPLE_VERSION (__clang_major__*1000 + __clang_minor__*10)
#elif defined(__clang_major__)
+# undef GNUC_VERSION
# define LLVM_VERSION (__clang_major__*1000 + __clang_minor__*10)
#endif
diff --git a/TestPrograms/test_ppc_power7.cxx b/TestPrograms/test_ppc_power7.cxx
index 22b791d6..3171a45e 100644
--- a/TestPrograms/test_ppc_power7.cxx
+++ b/TestPrograms/test_ppc_power7.cxx
@@ -1,10 +1,12 @@
-#if defined(__GNUC_MAJOR__)
-# define GNUC_VERSION (__GNUC__*1000 + __GNUC_MAJOR__*10)
+#if defined(__GNUC__)
+# define GNUC_VERSION (__GNUC__*1000 + __GNUC_MINOR__*10)
#endif
#if defined(__clang_major__) && defined(__apple_build_version__)
+# undef GNUC_VERSION
# define APPLE_VERSION (__clang_major__*1000 + __clang_minor__*10)
#elif defined(__clang_major__)
+# undef GNUC_VERSION
# define LLVM_VERSION (__clang_major__*1000 + __clang_minor__*10)
#endif
diff --git a/TestPrograms/test_ppc_power8.cxx b/TestPrograms/test_ppc_power8.cxx
index 00a3309c..90950dd4 100644
--- a/TestPrograms/test_ppc_power8.cxx
+++ b/TestPrograms/test_ppc_power8.cxx
@@ -1,10 +1,12 @@
-#if defined(__GNUC_MAJOR__)
-# define GNUC_VERSION (__GNUC__*1000 + __GNUC_MAJOR__*10)
+#if defined(__GNUC__)
+# define GNUC_VERSION (__GNUC__*1000 + __GNUC_MINOR__*10)
#endif
#if defined(__clang_major__) && defined(__apple_build_version__)
+# undef GNUC_VERSION
# define APPLE_VERSION (__clang_major__*1000 + __clang_minor__*10)
#elif defined(__clang_major__)
+# undef GNUC_VERSION
# define LLVM_VERSION (__clang_major__*1000 + __clang_minor__*10)
#endif
diff --git a/TestPrograms/test_ppc_power9.cxx b/TestPrograms/test_ppc_power9.cxx
index d7951f47..0b676fa6 100644
--- a/TestPrograms/test_ppc_power9.cxx
+++ b/TestPrograms/test_ppc_power9.cxx
@@ -1,10 +1,12 @@
-#if defined(__GNUC_MAJOR__)
-# define GNUC_VERSION (__GNUC__*1000 + __GNUC_MAJOR__*10)
+#if defined(__GNUC__)
+# define GNUC_VERSION (__GNUC__*1000 + __GNUC_MINOR__*10)
#endif
#if defined(__clang_major__) && defined(__apple_build_version__)
+# undef GNUC_VERSION
# define APPLE_VERSION (__clang_major__*1000 + __clang_minor__*10)
#elif defined(__clang_major__)
+# undef GNUC_VERSION
# define LLVM_VERSION (__clang_major__*1000 + __clang_minor__*10)
#endif