From f230e3f08b1dc472c42f121bda47ec24932a4702 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Sat, 19 Oct 2024 02:17:56 -0700 Subject: [PATCH] Suppress float16 suffix warnings w/ gcc-14 --- src/H5Tconv_float.c | 6 ++++++ src/H5Tconv_integer.c | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/H5Tconv_float.c b/src/H5Tconv_float.c index 561e29714dd..9ba3036c239 100644 --- a/src/H5Tconv_float.c +++ b/src/H5Tconv_float.c @@ -1732,7 +1732,9 @@ H5T__conv_float__Float16(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, c { /* Suppress warning about non-standard floating-point literal suffix */ H5_GCC_CLANG_DIAG_OFF("pedantic") + H5_GCC_DIAG_OFF("c11-c23-compat") H5T_CONV_Ff(FLOAT, FLOAT16, float, H5__Float16, -FLT16_MAX, FLT16_MAX); + H5_GCC_DIAG_ON("c11-c23-compat") H5_GCC_CLANG_DIAG_ON("pedantic") } #endif @@ -1991,7 +1993,9 @@ H5T__conv_double__Float16(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, { /* Suppress warning about non-standard floating-point literal suffix */ H5_GCC_CLANG_DIAG_OFF("pedantic") + H5_GCC_DIAG_OFF("c11-c23-compat") H5T_CONV_Ff(DOUBLE, FLOAT16, double, H5__Float16, -FLT16_MAX, FLT16_MAX); + H5_GCC_DIAG_ON("c11-c23-compat") H5_GCC_CLANG_DIAG_ON("pedantic") } #endif @@ -2255,7 +2259,9 @@ H5T__conv_ldouble__Float16(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, { /* Suppress warning about non-standard floating-point literal suffix */ H5_GCC_CLANG_DIAG_OFF("pedantic") + H5_GCC_DIAG_OFF("c11-c23-compat") H5T_CONV_Ff(LDOUBLE, FLOAT16, long double, H5__Float16, -FLT16_MAX, FLT16_MAX); + H5_GCC_DIAG_ON("c11-c23-compat") H5_GCC_CLANG_DIAG_ON("pedantic") } #endif diff --git a/src/H5Tconv_integer.c b/src/H5Tconv_integer.c index 6d92c67ed24..0f6e780d3a2 100644 --- a/src/H5Tconv_integer.c +++ b/src/H5Tconv_integer.c @@ -1743,7 +1743,9 @@ H5T__conv_ushort__Float16(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, { /* Suppress warning about non-standard floating-point literal suffix */ H5_GCC_CLANG_DIAG_OFF("pedantic") + H5_GCC_DIAG_OFF("c11-c23-compat") H5T_CONV_Xf(USHORT, FLOAT16, unsigned short, H5__Float16, -FLT16_MAX, FLT16_MAX); + H5_GCC_DIAG_ON("c11-c23-compat") H5_GCC_CLANG_DIAG_ON("pedantic") } #endif @@ -1972,7 +1974,9 @@ H5T__conv_int__Float16(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, con { /* Suppress warning about non-standard floating-point literal suffix */ H5_GCC_CLANG_DIAG_OFF("pedantic") + H5_GCC_DIAG_OFF("c11-c23-compat") H5T_CONV_Xf(INT, FLOAT16, int, H5__Float16, -FLT16_MAX, FLT16_MAX); + H5_GCC_DIAG_ON("c11-c23-compat") H5_GCC_CLANG_DIAG_ON("pedantic") } #endif @@ -2201,7 +2205,9 @@ H5T__conv_uint__Float16(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, co { /* Suppress warning about non-standard floating-point literal suffix */ H5_GCC_CLANG_DIAG_OFF("pedantic") + H5_GCC_DIAG_OFF("c11-c23-compat") H5T_CONV_Xf(UINT, FLOAT16, unsigned int, H5__Float16, -FLT16_MAX, FLT16_MAX); + H5_GCC_DIAG_ON("c11-c23-compat") H5_GCC_CLANG_DIAG_ON("pedantic") } #endif @@ -2430,7 +2436,9 @@ H5T__conv_long__Float16(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, co { /* Suppress warning about non-standard floating-point literal suffix */ H5_GCC_CLANG_DIAG_OFF("pedantic") + H5_GCC_DIAG_OFF("c11-c23-compat") H5T_CONV_Xf(LONG, FLOAT16, long, H5__Float16, -FLT16_MAX, FLT16_MAX); + H5_GCC_DIAG_ON("c11-c23-compat") H5_GCC_CLANG_DIAG_ON("pedantic") } #endif @@ -2659,7 +2667,9 @@ H5T__conv_ulong__Float16(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, c { /* Suppress warning about non-standard floating-point literal suffix */ H5_GCC_CLANG_DIAG_OFF("pedantic") + H5_GCC_DIAG_OFF("c11-c23-compat") H5T_CONV_Xf(ULONG, FLOAT16, unsigned long, H5__Float16, -FLT16_MAX, FLT16_MAX); + H5_GCC_DIAG_ON("c11-c23-compat") H5_GCC_CLANG_DIAG_ON("pedantic") } #endif @@ -2888,7 +2898,9 @@ H5T__conv_llong__Float16(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, c { /* Suppress warning about non-standard floating-point literal suffix */ H5_GCC_CLANG_DIAG_OFF("pedantic") + H5_GCC_DIAG_OFF("c11-c23-compat") H5T_CONV_Xf(LLONG, FLOAT16, long long, H5__Float16, -FLT16_MAX, FLT16_MAX); + H5_GCC_DIAG_ON("c11-c23-compat") H5_GCC_CLANG_DIAG_ON("pedantic") } #endif @@ -3119,7 +3131,9 @@ H5T__conv_ullong__Float16(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, { /* Suppress warning about non-standard floating-point literal suffix */ H5_GCC_CLANG_DIAG_OFF("pedantic") + H5_GCC_DIAG_OFF("c11-c23-compat") H5T_CONV_Xf(ULLONG, FLOAT16, unsigned long long, H5__Float16, -FLT16_MAX, FLT16_MAX); + H5_GCC_DIAG_ON("c11-c23-compat") H5_GCC_CLANG_DIAG_ON("pedantic") } #endif