public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub 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: Wed, 24 Aug 2022 14:49:58 +0000 [thread overview] Message-ID: <bug-106652-4-qH60RmHeg8@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 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org, | |ppalka at gcc dot gnu.org, | |redi at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- On targets that do have __float128, I believe we want to mangle it as before and also handle usual arithmetic conversions etc. the same we did before unless the C++23 extended floating-point types are involved. Which is why I've introduced the float128t_type_node hack, where non-C++ can continue to do what it did before but for C++ __float128 will be a new distinct type. For mangling of std::float{16,32,64,128}_t I'm using the Itanium ABI _Float{16,32,64,128} mangling, i.e. DF{16,32,64,128}_ This collides with the apparently never really used mangling of FIXED_POINT_TYPEs (fixed points are really only supported in C on a few platforms, not in C++, and at some point they leaked into the C++ FE through 0r and similar literals, but that has been fixed shortly afterwards). The patch only introduces _Float{16,32,64,128}, not _Float{32,64,128}x that C also supports, so I've removed __FLT{32,64,128}X_* predefined macros. The patch is still incomplete and I'm getting stuck on it (except I can surely provide testsuite coverage for what is already implemented): 1) there is no bf16/BF16 constant suffix nor underlying type for std::bfloat16_t for now; I think we need to come to agreement on how the underlying type would be called (__bf16 like aarch64/arm/i386 currently have their extension type?) and how to mangle it (all 3 currently mangle it as u6__bf16) and if we choose a different keyword for it whether it is distinct from __bf16 2) I haven't implemented the [conv.double] addition: "with a greater or equal conversion rank ([conv.rank]). A prvalue of standard floating-point type can be converted to a prvalue of another standard floating-point type" - not really sure where it should be done (but the new cp_compare_floating_point_conversion_ranks function can be used to compare ranks and subranks) 3) for the [expr.static.cast] addition, I wonder if there is anything to do, I'd expect it would just work as is 4) for the [expr.arith.conv] changes, I think I've implement those in cp_common_type, except for the "Otherwise, the expression is ill-formed." part where I just return error_mark_node, but cp_common_type doesn't emit any diagnostics whatsoever, so I wonder if it should be done somewhere in the callers, or if the function and its wrappers should get tsubst_flags_t complain argument or what. 5) I've skipped the [over.ics.rank] changes, I'm afraid it is another thing I'm not really familiar with 6) the library part is unimplemented altogether, the __FLT* macros can be used to implement numerical limits, but e.g. for the <cmath>/<complex> stuff not really sure how far can we get for std::float128_t if not on glibc or on old glibc (guess the others at least when they match float/double which can be tested through preprocessor macros can be handled by casts to those types)
next prev parent reply other threads:[~2022-08-24 14:49 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 [this message] 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 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-qH60RmHeg8@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: linkBe 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).