diff --git a/opal/include/opal_stdint.h b/opal/include/opal_stdint.h index 4d8587109b..d08b22073b 100644 --- a/opal/include/opal_stdint.h +++ b/opal/include/opal_stdint.h @@ -147,7 +147,14 @@ typedef uint128_t opal_uint128_t; /* suppress warning about __int128 type */ #pragma GCC diagnostic push +/* Clang won't quietly accept "-pedantic", but GCC versions older than ~4.8 + * won't quietly accept "-Wpedanic". The whole "#pragma GCC diagnostic ..." + * facility only was added to GCC as of version 4.6. */ +#if defined(__clang__) #pragma GCC diagnostic ignored "-Wpedantic" +#else +#pragma GCC diagnostic ignored "-pedantic" +#endif typedef __int128 opal_int128_t; typedef unsigned __int128 opal_uint128_t; #pragma GCC diagnostic pop