public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Merge #860
@ 2022-06-08 11:59 Thomas Schwinge
0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-06-08 11:59 UTC (permalink / raw)
To: gcc-cvs
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(-)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-08 11:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 11:59 [gcc/devel/rust/master] Merge #860 Thomas Schwinge
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).