]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gas/read.c
Fix problems translating messages when a percentage sign appears at the end of a...
[thirdparty/binutils-gdb.git] / gas / read.c
index 935b1fa7bde655542a64f1646f951d315c236c59..ea9261e639b52eca9adcff243755ee34efde7b48 100644 (file)
@@ -4546,9 +4546,14 @@ emit_expr_with_reloc (expressionS *exp,
       use = get & unmask;
       if ((get & mask) != 0 && (-get & mask) != 0)
        {
+         char get_buf[128];
+         char use_buf[128];
+
+         /* These buffers help to ease the translation of the warning message.  */
+         sprintf_vma (get_buf, get);
+         sprintf_vma (use_buf, use);
          /* Leading bits contain both 0s & 1s.  */
-         as_warn (_("value 0x%" BFD_VMA_FMT "x truncated to 0x%" BFD_VMA_FMT "x"),
-                  get, use);
+         as_warn (_("value 0x%s truncated to 0x%s"), get_buf, use_buf);
        }
       /* Put bytes in right order.  */
       md_number_to_chars (p, use, (int) nbytes);