]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Allow float type to be casted as integer type
authorNobel <nobel2073@gmail.com>
Sat, 21 Dec 2024 18:11:39 +0000 (23:56 +0545)
committerArthur Cohen <arthur.cohen@embecosm.com>
Fri, 21 Mar 2025 11:56:56 +0000 (12:56 +0100)
commit1cad5f2bed18f673112e3b256c64c836fde2550a
tree4d25475cf38610caf15b441fc351f33f9353c08e
parentf821a513843baabed8a39601bbc714558110b748
gccrs: Allow float type to be casted as integer type

gccrs now should be able to cast float types as numeric.

gcc/rust/ChangeLog:

* typecheck/rust-casts.cc (TypeCastRules::cast_rules): Add rule.

gcc/testsuite/ChangeLog:

* rust/compile/cast_float_as_integer.rs: New test.

Signed-off-by: Nobel Singh <nobel2073@gmail.com>
gcc/rust/typecheck/rust-casts.cc
gcc/testsuite/rust/compile/cast_float_as_integer.rs [new file with mode: 0644]