On Wed, 4 Sep 2024, Mark E Anderson wrote:

Side note - Fred, can you send me some ports where I can find the Float16 bug?

I don't know of any specific *ports* (yet), since I found this in some legacy-support testing involving trying all possible combinations of OS (with the associated Xcode compiler) and SDK. The conditions for failure are:

1) Using the macOS 15 SDK.

2) Using the math.h header.

3) Using any compiler that doesn't implement the _Float16 type.

I didn't keep track of which OS/compiler cases are too old for _Float16, though I could investigate that if needed. My guess is that at least some MacPorts compilers are sufficiently old for #3, so you don't necessarily need an old OS install. Requirements #1 and #2 are trivial to create.

Apple typically tries to provide fallbacks for older compilers, though they don't always get it right. This case can't just be a dummy macro definition, though conditionaling out the entire set of declarations would work. I don't know if there's a way to directly test for _Float16 support in a preproccessor conditional, or whether it would have to be yet another kludge that tests for specific clang versions or specific gcc versions.

Fred Wright

Reply via email to