diff options
Diffstat (limited to 'gcc/rust/rust-gcc.cc')
-rw-r--r-- | gcc/rust/rust-gcc.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-gcc.cc index 4906634..109b5d9 100644 --- a/gcc/rust/rust-gcc.cc +++ b/gcc/rust/rust-gcc.cc @@ -345,8 +345,14 @@ get_identifier_node (const std::string &str) tree wchar_type () { - tree wchar = make_unsigned_type (32); - TYPE_STRING_FLAG (wchar) = 1; + static tree wchar; + + if (wchar == NULL_TREE) + { + wchar = make_unsigned_type (32); + TYPE_STRING_FLAG (wchar) = 1; + } + return wchar; } |