diff options
author | Philip Herron <philip.herron@embecosm.com> | 2021-01-06 14:53:35 +0000 |
---|---|---|
committer | Philip Herron <herron.philip@googlemail.com> | 2021-01-08 10:05:40 +0000 |
commit | 290fc4f416c94a86aa5e3d22b785890a12686972 (patch) | |
tree | 192c18da12f6cfdf507e6f444fffd0ff26e8e5d9 /gcc/rust/backend/rust-compile-tyty.h | |
parent | af04ea2222b6407fb3e83759ae332d600495380c (diff) | |
download | gcc-290fc4f416c94a86aa5e3d22b785890a12686972.zip gcc-290fc4f416c94a86aa5e3d22b785890a12686972.tar.gz gcc-290fc4f416c94a86aa5e3d22b785890a12686972.tar.bz2 |
Add test to cover handling hex, binary and octal number literals.
This also ensure the type suffix is respected against the number.
Diffstat (limited to 'gcc/rust/backend/rust-compile-tyty.h')
-rw-r--r-- | gcc/rust/backend/rust-compile-tyty.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/rust/backend/rust-compile-tyty.h b/gcc/rust/backend/rust-compile-tyty.h index 528f90e..2d4e1f0 100644 --- a/gcc/rust/backend/rust-compile-tyty.h +++ b/gcc/rust/backend/rust-compile-tyty.h @@ -132,19 +132,19 @@ public: switch (type.get_kind ()) { case TyTy::UintType::U8: - translated = backend->named_type ("i8", backend->integer_type (true, 8), + translated = backend->named_type ("u8", backend->integer_type (true, 8), Linemap::predeclared_location ()); return; case TyTy::UintType::U16: translated - = backend->named_type ("i16", backend->integer_type (true, 16), + = backend->named_type ("u16", backend->integer_type (true, 16), Linemap::predeclared_location ()); return; case TyTy::UintType::U32: translated - = backend->named_type ("i32", backend->integer_type (true, 32), + = backend->named_type ("u32", backend->integer_type (true, 32), Linemap::predeclared_location ()); return; |