From a4da9bf6bee36aa412281bfc08b7e14bd6870ac4 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Thu, 24 Oct 2019 05:33:15 -0400 Subject: Guard PowerPC feature tests Clang is producing spurious noise --- TestPrograms/test_ppc_altivec.cxx | 5 +++++ TestPrograms/test_ppc_power7.cxx | 3 ++- TestPrograms/test_ppc_power8.cxx | 5 +++++ TestPrograms/test_ppc_power9.cxx | 16 ++++------------ 4 files changed, 16 insertions(+), 13 deletions(-) (limited to 'TestPrograms') 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 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 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 int main(int argc, char* argv[]) -- cgit v1.2.1