unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob e6c82f704e788099fba29a30b1d56ed12d5786fe 1131 bytes (raw)
name: gnu/packages/patches/binutils-libiberty-endianness-bug.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 
This patch fixes a bug exposed when running the libiberty test suite on
big-endian machines.

Original bug report:
https://sourceware.org/bugzilla/show_bug.cgi?id=27751
Follow-ups:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100177
https://gcc.gnu.org/pipermail/gcc-patches/2021-April/568314.html

---
 libiberty/rust-demangle.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/libiberty/rust-demangle.c b/libiberty/rust-demangle.c
index 6fd8f6a4db0..848563fa3c3 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{");
-- 
2.31.1


debug log:

solving e6c82f704e ...
found e6c82f704e in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).