-
Notifications
You must be signed in to change notification settings - Fork 12.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[clang] missing support for _Float128 (C23) #80195
Comments
@llvm/issue-subscribers-backend-aarch64 Author: Nick Desaulniers (nickdesaulniers)
```c
_Float128 x;
```
```
<source>:1:1: error: unknown type name '_Float128'
1 | _Float128 x;
| ^
```
"Annex H (normative) IEC 60559 interchange and extended types" subsection "H.2.1 Interchange floating types" talks about:
> Types designated: Looks like clang does not support this type. The extension type > An implementation that defines STDC_IEC_60559_BFP and STDC_IEC_60559_TYPES shall Otherwise libraries that seek to provide support for functions that have In particular, porting code making excessive use of |
Note _Float128 could be easily supported for aarch64-linux-gnu as Note also _Float128 support was addded in GCC 7+ for aarch64-- (darwin is not supported in GCC yet). |
GNU GCC 13 supports both __float128 and _Float128 on MacOS aarch64, unsure about x86. Is there any reason not to make |
Note that there seem to be some ABI bugs on 32-bit platforms, see the garbage output at https://gcc.godbolt.org/z/avxEGPoz9. Also: |
"Annex H (normative) IEC 60559 interchange and extended types" subsection "H.2.1 Interchange floating types" talks about:
Looks like clang does not support this type. The extension type
__float128
seems supported, but only on x86_64 (or rather, at least not on aarch64 where insteadlong double
seems to be 128b). After first class compiler support is enabled for these types on all supported targets, there's some preprocessor defines that should be defined by clang as well.Otherwise libraries that seek to provide support for functions that have
_Float128
return or parameter types need to result to compiler version detection (rather than feature detection) and type alias to compiler extensions (orlong double
🤢 🤮 ).In particular, porting code making excessive use of
long double
on x86_64 to aarch64 has been quite painful._Float128
will help, but clang is currently missing pieces that may help make code more platform-portable easier.The text was updated successfully, but these errors were encountered: