From ace215aafedd62a51ff859856a755c6f58402fcf Mon Sep 17 00:00:00 2001 From: Wesley Maxey Date: Thu, 28 Apr 2022 15:47:13 -0700 Subject: [PATCH] xlc with pedantic trips on minimum required variadic macro arguments, silence with pragmas --- include/nv/detail/__target_macros | 2 +- include/nv/target | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/nv/detail/__target_macros b/include/nv/detail/__target_macros index a0e9916726..11f213ae7e 100644 --- a/include/nv/detail/__target_macros +++ b/include/nv/detail/__target_macros @@ -456,7 +456,7 @@ # define _NV_TARGET_DISPATCH(...) _NV_BLOCK_EXPAND(_NV_DISPATCH_N_ARY(_NV_TARGET_DISPATCH_HANDLE, __VA_ARGS__)) // NV_IF_TARGET supports a false statement provided as a variadic macro -# define NV_IF_TARGET(cond, t, ...) _NV_BLOCK_EXPAND(_NV_TARGET_IF(cond, t, __VA_ARGS__)) +# define NV_IF_TARGET(cond, ...) _NV_BLOCK_EXPAND(_NV_TARGET_IF(cond, __VA_ARGS__)) # define NV_IF_ELSE_TARGET(cond, t, f) _NV_BLOCK_EXPAND(_NV_TARGET_IF(cond, t, f)) # define NV_DISPATCH_TARGET(...) _NV_TARGET_DISPATCH(__VA_ARGS__) diff --git a/include/nv/target b/include/nv/target index 1dd0a89535..8622cd2605 100644 --- a/include/nv/target +++ b/include/nv/target @@ -35,8 +35,9 @@ # define _NV_BITSET_ATTRIBUTE #endif -#if (defined(__cplusplus) && __cplusplus >= 201103L) || \ - (defined(_MSC_VER) && _MSVC_LANG >= 201103L) +#if (!defined(__ibmxl__)) && \ + ((defined(__cplusplus) && __cplusplus >= 201103L) || \ + (defined(_MSC_VER) && _MSVC_LANG >= 201103L)) # define _NV_TARGET_CPP11 #endif