<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/80195>80195</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang] missing support for _Float128 (C23)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang,
backend:AArch64,
c23
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
nickdesaulniers
</td>
</tr>
</table>
<pre>
```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:
_FloatN
where N is 16, 32, 64, or ≥ 128 and a multiple of 32
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). 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.
> An implementation that defines __STDC_IEC_60559_BFP__ and __STDC_IEC_60559_TYPES__ shall
provide _Float32 and _Float64 as interchange floating types with the same representation and
alignment requirements as float and double, respectively. If the implementation’s long double
type supports an IEC 60559 interchange format of width N > 64, then the implementation shall also
provide the type _FloatN as an interchange floating type with the same representation and alignment
requirements as long double.
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.
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.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEVl9v4r4S_TTmZbQocUiABx7YFrSVrvautH25T8iJB-KLY2c9DpRv_9M4QOluV7-qpfljz5xz5swYRWQODnElyq-ifJ6oIbY-rJxpjhpJDdYZDDSpvb6sRJWNv43InkW23m2tVzGXC3gTxdfx2X3N57fFE_khNCiKjSjW-fUPMAQf-GJwR-fPDuKlR3CqQxByfs8j5HyMAwCQg5g_wWcYIP3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