aboutsummaryrefslogtreecommitdiff
path: root/libiberty/rust-demangle.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2021-07-03 14:00:33 +0100
committerNick Clifton <nickc@redhat.com>2021-07-03 14:00:33 +0100
commit20c4b12e937b20f0998bd25ad37c77145650e826 (patch)
treebcc05850ae7ed90cedb0368ab7f8b3a88a703500 /libiberty/rust-demangle.c
parent0d03c52682bec990371b2f006e186641cf86f923 (diff)
downloadgdb-20c4b12e937b20f0998bd25ad37c77145650e826.zip
gdb-20c4b12e937b20f0998bd25ad37c77145650e826.tar.gz
gdb-20c4b12e937b20f0998bd25ad37c77145650e826.tar.bz2
Synchronize libiberty sources (and include/demangle.h) with GCC master version
Diffstat (limited to 'libiberty/rust-demangle.c')
-rw-r--r--libiberty/rust-demangle.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libiberty/rust-demangle.c b/libiberty/rust-demangle.c
index 6fd8f6a..449941b 100644
--- a/libiberty/rust-demangle.c
+++ b/libiberty/rust-demangle.c
@@ -1253,9 +1253,12 @@ demangle_const_char (struct rust_demangler *rdm)
else if (value == '\n')
PRINT ("\\n");
else if (value > ' ' && value < '~')
- /* Rust also considers many non-ASCII codepoints to be printable, but
- that logic is not easily ported to C. */
- print_str (rdm, (char *) &value, 1);
+ {
+ /* Rust also considers many non-ASCII codepoints to be printable, but
+ that logic is not easily ported to C. */
+ char c = value;
+ print_str (rdm, &c, 1);
+ }
else
{
PRINT ("\\u{");