public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Thomas Schwinge <tschwinge@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/rust/master] Merge #860 Date: Wed, 8 Jun 2022 11:59:16 +0000 (GMT) [thread overview] Message-ID: <20220608115916.C068F3AA903A@sourceware.org> (raw) https://gcc.gnu.org/g:03e56b5181506a4e6cdb9fe86c543a57840e54c3 commit 03e56b5181506a4e6cdb9fe86c543a57840e54c3 Merge: 230b55bb532 507dbac06d8 Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com> Date: Fri Jan 7 12:47:36 2022 +0000 Merge #860 860: Add overflow checking on LiteralExpression r=philberty a=philberty This checks that the literal value is within the bounds of their respective types. I have omitted code fixing the other issue in the bug report that overflow/max_val integers should be saturated to infinity when cast to REAL_TYPE's this seems like something we really should have documentation to reference in the code as to why this is the correct Rust behaviour. Addresses #635 Co-authored-by: Philip Herron <philip.herron@embecosm.com> Diff: gcc/rust/backend/rust-compile-expr.cc | 207 ++++++++++++++++++++++++++ gcc/rust/backend/rust-compile-expr.h | 166 ++++++--------------- gcc/rust/hir/tree/rust-hir-expr.h | 3 +- gcc/rust/typecheck/rust-hir-const-fold.h | 6 +- gcc/rust/typecheck/rust-hir-type-check-expr.h | 10 +- gcc/rust/typecheck/rust-tycheck-dump.h | 2 +- gcc/rust/typecheck/rust-tyty-cast.h | 2 +- gcc/testsuite/rust/compile/issue-635-1.rs | 5 + gcc/testsuite/rust/compile/issue-635-2.rs | 5 + 9 files changed, 278 insertions(+), 128 deletions(-)
reply other threads:[~2022-06-08 11:59 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=20220608115916.C068F3AA903A@sourceware.org \ --to=tschwinge@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).