aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2021-01-06 12:54:57 +0000
committerPhilip Herron <herron.philip@googlemail.com>2021-01-08 11:37:22 +0000
commit06d946d52234e2776be002662439d43e3d557673 (patch)
tree2a8d6a810ff0f7ad759ed3d7764ad7c6d11eb092 /gcc/rust/backend
parent4e0189ed288223f8b376eedd286f5bdff5b35698 (diff)
downloadgcc-06d946d52234e2776be002662439d43e3d557673.zip
gcc-06d946d52234e2776be002662439d43e3d557673.tar.gz
gcc-06d946d52234e2776be002662439d43e3d557673.tar.bz2
Respect the f32 and f64 suffix on literals
Rust is permissive for integers being marked as floats so the check in the lexer can be removed here.
Diffstat (limited to 'gcc/rust/backend')
-rw-r--r--gcc/rust/backend/rust-compile-expr.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/gcc/rust/backend/rust-compile-expr.h b/gcc/rust/backend/rust-compile-expr.h
index 9081000..0370129 100644
--- a/gcc/rust/backend/rust-compile-expr.h
+++ b/gcc/rust/backend/rust-compile-expr.h
@@ -156,8 +156,6 @@ public:
return;
case HIR::Literal::FLOAT: {
- printf ("FLOATY BOYO: [%s]\n", expr.as_string ().c_str ());
-
mpfr_t fval;
if (mpfr_init_set_str (fval, expr.as_string ().c_str (), 10,
MPFR_RNDN)
@@ -177,8 +175,6 @@ public:
return;
}
- printf ("tyty float is [%s]\n", tyty->as_string ().c_str ());
-
Btype *type = TyTyResolveCompile::compile (ctx, tyty);
translated
= ctx->get_backend ()->float_constant_expression (type, fval);