summaryrefslogtreecommitdiff
path: root/TestPrograms
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-10-24 05:33:15 -0400
committerJeffrey Walton <noloader@gmail.com>2019-10-24 05:33:15 -0400
commita4da9bf6bee36aa412281bfc08b7e14bd6870ac4 (patch)
tree046fa736afe8107154d5829a2b642494ffb26028 /TestPrograms
parent20d3db813bf406a3653f0254e9504ae33833ddc9 (diff)
downloadcryptopp-git-a4da9bf6bee36aa412281bfc08b7e14bd6870ac4.tar.gz
Guard PowerPC feature tests
Clang is producing spurious noise
Diffstat (limited to 'TestPrograms')
-rw-r--r--TestPrograms/test_ppc_altivec.cxx5
-rw-r--r--TestPrograms/test_ppc_power7.cxx3
-rw-r--r--TestPrograms/test_ppc_power8.cxx5
-rw-r--r--TestPrograms/test_ppc_power9.cxx16
4 files changed, 16 insertions, 13 deletions
diff --git a/TestPrograms/test_ppc_altivec.cxx b/TestPrograms/test_ppc_altivec.cxx
index 64784256..ac1a20fc 100644
--- a/TestPrograms/test_ppc_altivec.cxx
+++ b/TestPrograms/test_ppc_altivec.cxx
@@ -1,3 +1,8 @@
+#define GNUC_VERSION (__GNUC__*1000 + __GNUC_MAJOR__*10)
+#if (GNUC_VERSION >= 4060) || defined(__clang__)
+# pragma GCC diagnostic ignored "-Wdeprecated"
+#endif
+
#include <altivec.h>
int main(int argc, char* argv[])
{
diff --git a/TestPrograms/test_ppc_power7.cxx b/TestPrograms/test_ppc_power7.cxx
index 4f274535..3e0cb3df 100644
--- a/TestPrograms/test_ppc_power7.cxx
+++ b/TestPrograms/test_ppc_power7.cxx
@@ -1,4 +1,5 @@
-#ifdef __GNUC__
+#define GNUC_VERSION (__GNUC__*1000 + __GNUC_MAJOR__*10)
+#if (GNUC_VERSION >= 4060) || defined(__clang__)
# pragma GCC diagnostic ignored "-Wdeprecated"
#endif
diff --git a/TestPrograms/test_ppc_power8.cxx b/TestPrograms/test_ppc_power8.cxx
index 2766b781..b5a56322 100644
--- a/TestPrograms/test_ppc_power8.cxx
+++ b/TestPrograms/test_ppc_power8.cxx
@@ -1,3 +1,8 @@
+#define GNUC_VERSION (__GNUC__*1000 + __GNUC_MAJOR__*10)
+#if (GNUC_VERSION >= 4060) || defined(__clang__)
+# pragma GCC diagnostic ignored "-Wdeprecated"
+#endif
+
#include <altivec.h>
int main(int argc, char* argv[])
{
diff --git a/TestPrograms/test_ppc_power9.cxx b/TestPrograms/test_ppc_power9.cxx
index 38e87398..6ae2e9c1 100644
--- a/TestPrograms/test_ppc_power9.cxx
+++ b/TestPrograms/test_ppc_power9.cxx
@@ -1,15 +1,7 @@
-// The problem we have here is, it appears only GCC 7.0 and above
-// support Power9 builtins. Clang 7.0 has support for some (all?)
-// assembly instructions but we don't see builtin support. We can't
-// determine the state of XLC. Searching IBM's website for
-// terms like 'darn' 'random number' is returning irrelevant hits.
-// Searching with Google from the outside returns 0 hits.
-//
-// The support disconnect means we may report Power9 as unavailable
-// and support DARN at the same time. We get into that state because
-// we use inline asm to detect DARN availablity in the compiler.
-// Also see cpu.cpp and the two query functions; and ppc_power9.cpp
-// and the two probe functions.
+#define GNUC_VERSION (__GNUC__*1000 + __GNUC_MAJOR__*10)
+#if (GNUC_VERSION >= 4060) || defined(__clang__)
+# pragma GCC diagnostic ignored "-Wdeprecated"
+#endif
#include <altivec.h>
int main(int argc, char* argv[])