From: "Kewen.Lin" <linkw@linux.ibm.com>
To: gcc-patches@gcc.gnu.org
Cc: arthur.cohen@embecosm.com, herron.philip@googlemail.com,
gcc-rust@gcc.gnu.org
Subject: PING^1 [PATCH 05/52] rust: Replace uses of {FLOAT,{,LONG_}DOUBLE}_TYPE_SIZE
Date: Wed, 12 Jun 2024 17:35:18 +0800 [thread overview]
Message-ID: <ccbef00a-cd5f-00d5-89ba-eb9c173feeb9@linux.ibm.com> (raw)
In-Reply-To: <2433deffaba4159f49ecaa4fc50e2a065c271aad.1717134752.git.linkw@linux.ibm.com>
Hi,
Gentle ping:
https://gcc.gnu.org/pipermail/gcc-patches/2024-June/653339.html
BR,
Kewen
on 2024/6/3 11:00, Kewen Lin wrote:
> Joseph pointed out "floating types should have their mode,
> not a poorly defined precision value" in the discussion[1],
> as he and Richi suggested, the existing macros
> {FLOAT,{,LONG_}DOUBLE}_TYPE_SIZE will be replaced with a
> hook mode_for_floating_type. To be prepared for that, this
> patch is to replace use of {FLOAT,{,LONG_}DOUBLE}_TYPE_SIZE
> in rust with TYPE_PRECISION of {float,{,long_}double}_type_node.
>
> [1] https://gcc.gnu.org/pipermail/gcc-patches/2024-May/651209.html
>
> gcc/rust/ChangeLog:
>
> * rust-gcc.cc (float_type): Use TYPE_PRECISION of
> {float,double,long_double}_type_node to replace
> {FLOAT,DOUBLE,LONG_DOUBLE}_TYPE_SIZE.
> ---
> gcc/rust/rust-gcc.cc | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-gcc.cc
> index f17e19a2dfc..38169c08985 100644
> --- a/gcc/rust/rust-gcc.cc
> +++ b/gcc/rust/rust-gcc.cc
> @@ -411,11 +411,11 @@ tree
> float_type (int bits)
> {
> tree type;
> - if (bits == FLOAT_TYPE_SIZE)
> + if (bits == TYPE_PRECISION (float_type_node))
> type = float_type_node;
> - else if (bits == DOUBLE_TYPE_SIZE)
> + else if (bits == TYPE_PRECISION (double_type_node))
> type = double_type_node;
> - else if (bits == LONG_DOUBLE_TYPE_SIZE)
> + else if (bits == TYPE_PRECISION (long_double_type_node))
> type = long_double_type_node;
> else
> {
next parent reply other threads:[~2024-06-12 9:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1717134752.git.linkw@linux.ibm.com>
[not found] ` <2433deffaba4159f49ecaa4fc50e2a065c271aad.1717134752.git.linkw@linux.ibm.com>
2024-06-12 9:35 ` Kewen.Lin [this message]
2024-06-21 1:48 ` PING^2 " Kewen.Lin
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=ccbef00a-cd5f-00d5-89ba-eb9c173feeb9@linux.ibm.com \
--to=linkw@linux.ibm.com \
--cc=arthur.cohen@embecosm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gcc-rust@gcc.gnu.org \
--cc=herron.philip@googlemail.com \
/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).