public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Iain Buclaw <ibuclaw@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-9249] d: Use HOST_WIDE_INT for type size temporaries. Date: Thu, 18 Nov 2021 23:34:22 +0000 (GMT) [thread overview] Message-ID: <20211118233423.0083D3858422@sourceware.org> (raw) https://gcc.gnu.org/g:0b76bf46f2b40dca3b93ebca59449a749d52e675 commit r11-9249-g0b76bf46f2b40dca3b93ebca59449a749d52e675 Author: Iain Buclaw <ibuclaw@gdcproject.org> Date: Thu Nov 18 22:43:40 2021 +0100 d: Use HOST_WIDE_INT for type size temporaries. These variables are later used as the value for the format specifier `%wd`, which the expected type may not match dinteger_t, causing unnecessary -Wformat warnings. gcc/d/ChangeLog: * decl.cc (d_finish_decl): Use HOST_WIDE_INT for type size temporaries. (cherry picked from commit d6ec661e3931773e2f571ed4f6dd8b0402d8687d) Diff: --- gcc/d/decl.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/d/decl.cc b/gcc/d/decl.cc index 7d1378255bd..02e6b4cfdf8 100644 --- a/gcc/d/decl.cc +++ b/gcc/d/decl.cc @@ -1544,8 +1544,9 @@ d_finish_decl (tree decl) if (flag_checking && DECL_INITIAL (decl)) { /* Initializer must never be bigger than symbol size. */ - dinteger_t tsize = int_size_in_bytes (TREE_TYPE (decl)); - dinteger_t dtsize = int_size_in_bytes (TREE_TYPE (DECL_INITIAL (decl))); + HOST_WIDE_INT tsize = int_size_in_bytes (TREE_TYPE (decl)); + HOST_WIDE_INT dtsize = + int_size_in_bytes (TREE_TYPE (DECL_INITIAL (decl))); if (tsize < dtsize) {
reply other threads:[~2021-11-18 23:34 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20211118233423.0083D3858422@sourceware.org \ --to=ibuclaw@gcc.gnu.org \ --cc=gcc-cvs@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).