Skip to content

Commit

Permalink
Add temporary fix for ARM64 Mac _Float16 build failure (HDFGroup#4639)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhendersonHDF authored Jul 15, 2024
1 parent 6fa09bd commit 74fbc1d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion src/H5private.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 74fbc1d

Please sign in to comment.