public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Gaius Mulley <gaius@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/modula-2] Bugfix gm2_type_for_size. Patchset suggestion missed. Date: Tue, 6 Dec 2022 18:44:17 +0000 (GMT) [thread overview] Message-ID: <20221206184417.195B73875B46@sourceware.org> (raw) https://gcc.gnu.org/g:98b201a33be33a60e10e67fb7f6c9d0fc5da00fc commit 98b201a33be33a60e10e67fb7f6c9d0fc5da00fc Author: Gaius Mulley <gaiusmod2@gmail.com> Date: Tue Dec 6 18:43:44 2022 +0000 Bugfix gm2_type_for_size. Patchset suggestion missed. A feedback suggestion missed with the previous commits. Use build_nonstandard_integer_type to avoid getting a different type each time this function is called. gcc/m2/ChangeLog: * m2/gm2-lang.cc (gm2_type_for_size): Use build_nonstandard_integer_type. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com> Diff: --- gcc/m2/gm2-lang.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/m2/gm2-lang.cc b/gcc/m2/gm2-lang.cc index 2f57d740a36..4acec02b55c 100644 --- a/gcc/m2/gm2-lang.cc +++ b/gcc/m2/gm2-lang.cc @@ -816,7 +816,8 @@ gm2_type_for_size (unsigned int bits, int unsignedp) else if (bits == LONG_LONG_TYPE_SIZE) type = long_long_unsigned_type_node; else - type = make_unsigned_type (bits); + type = build_nonstandard_integer_type (bits, + unsignedp); } else { @@ -831,7 +832,8 @@ gm2_type_for_size (unsigned int bits, int unsignedp) else if (bits == LONG_LONG_TYPE_SIZE) type = long_long_integer_type_node; else - type = make_signed_type (bits); + type = build_nonstandard_integer_type (bits, + unsignedp); } return type; }
reply other threads:[~2022-12-06 18:44 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=20221206184417.195B73875B46@sourceware.org \ --to=gaius@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).