public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/106652] [C++23] P1467 - Extended floating-point types and standard names
Date: Tue, 18 Oct 2022 09:43:44 +0000	[thread overview]
Message-ID: <bug-106652-4-Z5LjzPIBrd@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106652-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #16 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:a23225fb4f764dfc3e3e729c7d7238f03f282aaa

commit r13-3354-ga23225fb4f764dfc3e3e729c7d7238f03f282aaa
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Oct 18 11:37:13 2022 +0200

    libstdc++: Partial library support for std::float{16,32,64,128}_t and
std::bfloat16_t

    The following patch is partial support for std::float{16,32,64,128}_t
    and std::bfloat16_t in libstdc++.
    https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1467r9.html
    says that <ostream>, <istream>, <charconv> and <complex>
    need changes toom, but that isn't implemented so far.
    In <cmath> the only thing missing I'm aware of is
    std::nextafter std::float16_t and std::bfloat16_t overloads (I think
    we probably need to implement that out of line somewhere, or inline? -
might
    need inline asm barriers) and std::nexttoward overloads (those are
    intentional, you said there is a LWG issue about that).
    Also, this patch has the glibc 2.26+ std::float128_t support for platforms
    where long double isn't IEEE quad format temporarily disabled
    because it depends on
    https://gcc.gnu.org/pipermail/gcc-patches/2022-October/603665.html
    changes which aren't in yet.

    The patch also doesn't include any testcases to cover the <type_traits>
    changes, it isn't clear to me where to put that.

    2022-10-18  Jakub Jelinek  <jakub@redhat.com>

            PR c++/106652
            * include/std/stdfloat: New file.
            * include/std/numbers (__glibcxx_numbers): Define and use it
            for __float128 explicit instantiations as well as
            _Float{16,32,64,128} and __gnu_cxx::__bfloat16_t.
            * include/std/atomic (atomic<_Float16>, atomic<_Float32>,
            atomic<_Float64>, atomic<_Float128>,
atomic<__gnu_cxx::__bfloat16_t>):
            New explicit instantiations.
            * include/std/type_traits (__is_floating_point_helper<_Float16>,
            __is_floating_point_helper<_Float32>,
            __is_floating_point_helper<_Float64>,
            __is_floating_point_helper<_Float128>,
            __is_floating_point_helper<__gnu_cxx::__bfloat16_t>): Likewise.
            * include/std/limits (__glibcxx_concat3_, __glibcxx_concat3,
            __glibcxx_float_n): Define.
            (numeric_limits<_Float16>, numeric_limits<_Float32>,
            numeric_limits<_Float64>, numeric_limits<_Float128>,
            numeric_limits<__gnu_cxx::__bfloat16_t>): New explicit
instantiations.
            * include/bits/std_abs.h (abs): New overloads for
            _Float{16,32,64,128} and __gnu_cxx::__bfloat16_t.
            * include/bits/c++config (_GLIBCXX_LDOUBLE_IS_IEEE_BINARY128):
Define
            if long double is IEEE quad.
            (__gnu_cxx::__bfloat16_t): New using.
            * include/c_global/cmath (acos, asin, atan, atan2, ceil, cos, cosh,
            exp, fabs, floor, fmod, frexp, ldexp, log, log10, modf, pow, sin,
            sinh, sqrt, tan, tanh, fpclassify, isfinite, isinf, isnan,
isnormal,
            signbit, isgreater, isgreaterequal, isless, islessequal,
            islessgreater, isunordered, acosh, asinh, atanh, cbrt, copysign,
erf,
            erfc, exp2, expm1, fdim, fma, fmax, fmin, hypot, ilogb, lgamma,
            llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
            nextafter, remainder, rint, round, scalbln, scalbn, tgamma, trunc,
            lerp): New overloads with _Float{16,32,64,128} or
            __gnu_cxx::__bfloat16_t types.
            * config/os/gnu-linux/os_defines.h (_GLIBCXX_HAVE_FLOAT128_MATH):
            Prepare for definition if glibc 2.26 and later implements *f128
APIs
            but comment out the actual definition for now.
            * include/ext/type_traits.h (__promote<_Float16>,
__promote<_Float32>,
            __promote<_Float64>, __promote<_Float128>,
            __promote<__gnu_cxx::__bfloat16_t>): New specializations.
            * include/Makefile.am (std_headers): Add stdfloat.
            * include/Makefile.in: Regenerated.
            * include/precompiled/stdc++.h: Include stdfloat.
            * testsuite/18_support/headers/stdfloat/types_std.cc: New test.
            * testsuite/18_support/headers/limits/synopsis_cxx23.cc: New test.
            *
testsuite/26_numerics/headers/cmath/c99_classification_macros_c++23.cc:
            New test.
            * testsuite/26_numerics/headers/cmath/functions_std_c++23.cc: New
test.
            * testsuite/26_numerics/numbers/4.cc: New test.
            * testsuite/29_atomics/atomic_float/requirements_cxx23.cc: New
test.

  parent reply	other threads:[~2022-10-18  9:43 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-16 17:14 [Bug c++/106652] New: " mpolacek at gcc dot gnu.org
2022-08-24 14:27 ` [Bug c++/106652] " jakub at gcc dot gnu.org
2022-08-24 14:49 ` jakub at gcc dot gnu.org
2022-08-24 16:56 ` jakub at gcc dot gnu.org
2022-08-24 17:35 ` joseph at codesourcery dot com
2022-08-25 12:51 ` jakub at gcc dot gnu.org
2022-08-25 12:55 ` jakub at gcc dot gnu.org
2022-08-25 14:39 ` jakub at gcc dot gnu.org
2022-09-09  9:44 ` jakub at gcc dot gnu.org
2022-09-09 18:12 ` jakub at gcc dot gnu.org
2022-09-10 10:20 ` jakub at gcc dot gnu.org
2022-09-10 10:22 ` jakub at gcc dot gnu.org
2022-09-10 17:28 ` jakub at gcc dot gnu.org
2022-09-10 17:31 ` jakub at gcc dot gnu.org
2022-09-10 18:13 ` jakub at gcc dot gnu.org
2022-09-27  6:18 ` cvs-commit at gcc dot gnu.org
2022-10-18  9:43 ` cvs-commit at gcc dot gnu.org [this message]
2022-10-19  9:26 ` cvs-commit at gcc dot gnu.org
2022-11-19  9:24 ` jakub at gcc dot gnu.org
2022-11-28 22:31 ` pinskia at gcc dot gnu.org
2022-12-09 15:20 ` pinskia at gcc dot gnu.org
2023-08-21 15:57 ` igorkuo at meta dot ua
2023-08-22 14:15 ` cvs-commit at gcc dot gnu.org
2023-08-22 14:16 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-106652-4-Z5LjzPIBrd@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).