]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: allow casts from numeric types to floats
authorPhilip Herron <herron.philip@googlemail.com>
Tue, 26 Nov 2024 15:33:35 +0000 (15:33 +0000)
committerArthur Cohen <arthur.cohen@embecosm.com>
Fri, 21 Mar 2025 11:33:04 +0000 (12:33 +0100)
commit80bc600efeb6d2e4342da3e558cd2b5562e78477
tree8a65bf7d33ac31e32dbfd279fc41dc2cf60c40a5
parentb10f33764e690158cbec10765f9209470c271cd6
gccrs: allow casts from numeric types to floats

Fixes Rust-GCC#3261

gcc/rust/ChangeLog:

* typecheck/rust-casts.cc (TypeCastRules::cast_rules): allow casts to float

gcc/testsuite/ChangeLog:

* rust/compile/issue-3261.rs: New test.

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
gcc/rust/typecheck/rust-casts.cc
gcc/testsuite/rust/compile/issue-3261.rs [new file with mode: 0644]