diff options
author | Jeffrey Walton <noloader@gmail.com> | 2020-08-06 17:45:35 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2020-08-06 17:45:35 -0400 |
commit | 3ca143b1900dbb24699dde563ea0ebfb46bbefbf (patch) | |
tree | 7427370f823766355ac1921f120ce24f0b616177 /TestPrograms | |
parent | 167d7121f86d3d1d362d2a1b7a161e8ff9df8a88 (diff) | |
download | cryptopp-git-3ca143b1900dbb24699dde563ea0ebfb46bbefbf.tar.gz |
Fix warning suppression on Apple platforms
Diffstat (limited to 'TestPrograms')
-rw-r--r-- | TestPrograms/test_cxx11_noexcept.cxx | 9 | ||||
-rw-r--r-- | TestPrograms/test_ppc_power7.cxx | 9 | ||||
-rw-r--r-- | TestPrograms/test_ppc_power8.cxx | 9 | ||||
-rw-r--r-- | TestPrograms/test_ppc_power9.cxx | 9 |
4 files changed, 32 insertions, 4 deletions
diff --git a/TestPrograms/test_cxx11_noexcept.cxx b/TestPrograms/test_cxx11_noexcept.cxx index 95cca1bc..f2813dc2 100644 --- a/TestPrograms/test_cxx11_noexcept.cxx +++ b/TestPrograms/test_cxx11_noexcept.cxx @@ -1,5 +1,12 @@ #define GNUC_VERSION (__GNUC__*1000 + __GNUC_MAJOR__*10)
-#if (GNUC_VERSION >= 4060) || defined(__clang__)
+
+#if defined(__apple_build_version__)
+# define APPLE_VERSION (__clang__*1000 + __clang_minor__*10)
+#else
+# define LLVM_VERSION (__clang__*1000 + __clang_minor__*10)
+#endif
+
+#if (GNUC_VERSION >= 4060) || (LLVM_VERSION >= 1070) || (APPLE_VERSION >= 2000)
# pragma GCC diagnostic ignored "-Wterminate"
#endif
diff --git a/TestPrograms/test_ppc_power7.cxx b/TestPrograms/test_ppc_power7.cxx index d6c568d0..e1f27ace 100644 --- a/TestPrograms/test_ppc_power7.cxx +++ b/TestPrograms/test_ppc_power7.cxx @@ -1,5 +1,12 @@ #define GNUC_VERSION (__GNUC__*1000 + __GNUC_MAJOR__*10)
-#if (GNUC_VERSION >= 4060) || defined(__clang__)
+
+#if defined(__apple_build_version__)
+# define APPLE_VERSION (__clang__*1000 + __clang_minor__*10)
+#else
+# define LLVM_VERSION (__clang__*1000 + __clang_minor__*10)
+#endif
+
+#if (GNUC_VERSION >= 4060) || (LLVM_VERSION >= 1070) || (APPLE_VERSION >= 2000)
# pragma GCC diagnostic ignored "-Wdeprecated"
#endif
diff --git a/TestPrograms/test_ppc_power8.cxx b/TestPrograms/test_ppc_power8.cxx index 451bf657..84840226 100644 --- a/TestPrograms/test_ppc_power8.cxx +++ b/TestPrograms/test_ppc_power8.cxx @@ -1,5 +1,12 @@ #define GNUC_VERSION (__GNUC__*1000 + __GNUC_MAJOR__*10)
-#if (GNUC_VERSION >= 4060) || defined(__clang__)
+
+#if defined(__apple_build_version__)
+# define APPLE_VERSION (__clang__*1000 + __clang_minor__*10)
+#else
+# define LLVM_VERSION (__clang__*1000 + __clang_minor__*10)
+#endif
+
+#if (GNUC_VERSION >= 4060) || (LLVM_VERSION >= 1070) || (APPLE_VERSION >= 2000)
# pragma GCC diagnostic ignored "-Wdeprecated"
#endif
diff --git a/TestPrograms/test_ppc_power9.cxx b/TestPrograms/test_ppc_power9.cxx index b39c5c7f..2333f9b3 100644 --- a/TestPrograms/test_ppc_power9.cxx +++ b/TestPrograms/test_ppc_power9.cxx @@ -1,5 +1,12 @@ #define GNUC_VERSION (__GNUC__*1000 + __GNUC_MAJOR__*10)
-#if (GNUC_VERSION >= 4060) || defined(__clang__)
+
+#if defined(__apple_build_version__)
+# define APPLE_VERSION (__clang__*1000 + __clang_minor__*10)
+#else
+# define LLVM_VERSION (__clang__*1000 + __clang_minor__*10)
+#endif
+
+#if (GNUC_VERSION >= 4060) || (LLVM_VERSION >= 1070) || (APPLE_VERSION >= 2000)
# pragma GCC diagnostic ignored "-Wdeprecated"
#endif
|