Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[clang] missing support for _Float128 (C23) #80195

Closed as duplicate of#97335
Closed as duplicate of#97335
Labels
@nickdesaulniers

Description

@nickdesaulniers
_Float128x;
<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 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.

An implementation that definesSTDC_IEC_60559_BFP andSTDC_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 (orlong double 🤢 🤮 ).

In particular, porting code making excessive use oflong 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp