C++ Logo


Advanced search

Re: [wg14/wg21 liaison] Report from the recent C/C++ liaison meeting (SG22); includes new floating point types(!)

From: Joseph Myers <joseph_at_[hidden]>
Date: Wed, 15 Sep 2021 18:12:53 +0000
On Wed, 15 Sep 2021, Thomas Köppe via Liaison wrote:

> - Currently, the new types are *exclusively* available in the
> _Reserved_name spelling (like "_Bool" was in C99), there is no set of
> "pretty" macros (like "bool" was in <stdbool.h>) -- that means that if C++
> decides to introduce new pretty names like (std::)float16_t, we have no
> immediately interoperable name (like "float16_t") that would be valid C,
> since there is no macro "#define float16_t _Float_16", say.

Also, note that C *does* have typedef names such as _Float16_t - that's a
type whose range and precision are used for evaluating operations on type
_Float16, analogous to float_t and double_t.

I suggest it would be confusing for float16_t to mean something different
from _Float16_t, and so float16_t may not be a good name to use to mean
_Float16 in C++.

Joseph S. Myers

Received on 2021-09-15 13:13:01