https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112498

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|UNCONFIRMED                 |RESOLVED
          Component|libstdc++                   |c++
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=111842

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
No.
```
_Float16 f(float a)
{
  return a;
}
```

is invalid C++23 code.
<source>:3:10: warning: converting to '_Float16' from 'float' with greater
conversion rank

Maybe we should add this to the FAQ because we get a question about implicit
conversion from _Float16 to float a few times now.


See
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1467r4.html#implicit

Which is the C++ paper which adds the extended floating point types and GCC
implements it full. Just as an extension allows the conversion (with a warning)
but since we cannot have different behavior for sfinae and concepts with
-pedantic/-pedantic-errors std::is_convertible needs to return false.

Reply via email to