diff --git a/.github/workflows/main-cmake.yml b/.github/workflows/main-cmake.yml index e1de81ba16..897f15c984 100644 --- a/.github/workflows/main-cmake.yml +++ b/.github/workflows/main-cmake.yml @@ -110,7 +110,7 @@ jobs: # but that seems unnecessary - name: "MacOS Clang" os: macos-latest - cpp: OFF + cpp: ON fortran: ON java: ON docs: ON diff --git a/src/H5private.h b/src/H5private.h index c7a622ebd2..43412735b4 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -586,8 +586,14 @@ * _Float16 type to avoid issues when compiling the library * with the -pedantic flag or similar where we get warnings * about _Float16 not being an ISO C type. + * + * Due to the inclusion of H5private.h from the C++ wrappers, + * this typedef creation must be avoided when __cplusplus is + * defined to avoid build failures on ARM64 Macs. GCC and + * Clang either do not currently provide a _Float16 type for + * C++ on ARM64, or may need an additional compile-time flag. */ -#ifdef H5_HAVE__FLOAT16 +#if defined(H5_HAVE__FLOAT16) && !defined(__cplusplus) #if defined(__GNUC__) __extension__ typedef _Float16 H5__Float16; #else