aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-06-18 13:34:04 -0600
committerTom Tromey <tom@tromey.com>2021-06-18 13:47:51 -0600
commit8dd844ad0ab6378e6f6317dd93883bc8f642e642 (patch)
treed3b96584a16fa603c1c8cd0607f446e757c92436 /gcc/rust
parent231de190d1c8666748eb1c346d22c73946aba743 (diff)
downloadgcc-8dd844ad0ab6378e6f6317dd93883bc8f642e642.zip
gcc-8dd844ad0ab6378e6f6317dd93883bc8f642e642.tar.gz
gcc-8dd844ad0ab6378e6f6317dd93883bc8f642e642.tar.bz2
Use DW_ATE_UTF for the Rust 'char' type
The Rust 'char' type should use the DWARF DW_ATE_UTF encoding.
Diffstat (limited to 'gcc/rust')
-rw-r--r--gcc/rust/rust-gcc.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-gcc.cc
index e6c8858..3158c11 100644
--- a/gcc/rust/rust-gcc.cc
+++ b/gcc/rust/rust-gcc.cc
@@ -217,10 +217,8 @@ public:
Btype *wchar_type ()
{
- // i think this is meant to be 32 bit from
- // https://www.unicode.org/versions/Unicode13.0.0/ch03.pdf#G7404
- int precision = 32;
- tree wchar = make_unsigned_type (precision);
+ tree wchar = make_unsigned_type (32);
+ TYPE_STRING_FLAG (wchar) = 1;
return this->make_type (wchar);
}