gas: fold three as_warn() in emit_expr_with_reloc()
authorJan Beulich <jbeulich@suse.com>
Mon, 14 Jun 2021 06:18:58 +0000 (08:18 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 14 Jun 2021 06:18:58 +0000 (08:18 +0200)
Simply use the available abstraction instead of, effectively, trying to
open-code it.

gas/ChangeLog
gas/read.c

index 493fde0e2185e8e174cad564c05b1e786158db76..ecd0794b643046adc577f7d9419ae330376b686c 100644 (file)
@@ -1,3 +1,7 @@
+2021-06-14  Jan Beulich  <jbeulich@suse.com>
+
+       * read.c (emit_expr_with_reloc): Fold three as_warn().
+
 2021-06-14  Jan Beulich  <jbeulich@suse.com>
 
        * doc/internals.texi (TC_ADDRESS_BYTES): Mention generic default.
index 380281dd403a248624d64eb143cc8071e695d329..2f93e1bfd9625ff85b4eedb94f6283eae1222eec 100644 (file)
@@ -4539,18 +4539,8 @@ emit_expr_with_reloc (expressionS *exp,
              || (get & hibit) == 0))
        {
          /* Leading bits contain both 0s & 1s.  */
-#if defined (BFD64) && BFD_HOST_64BIT_LONG_LONG
-#ifndef __MSVCRT__
-         as_warn (_("value 0x%llx truncated to 0x%llx"),
-                  (unsigned long long) get, (unsigned long long) use);
-#else
-         as_warn (_("value 0x%I64x truncated to 0x%I64x"),
-                  (unsigned long long) get, (unsigned long long) use);
-#endif
-#else
-         as_warn (_("value 0x%lx truncated to 0x%lx"),
-                  (unsigned long) get, (unsigned long) use);
-#endif
+         as_warn (_("value 0x%" BFD_VMA_FMT "x truncated to 0x%" BFD_VMA_FMT "x"),
+                  get, use);
        }
       /* Put bytes in right order.  */
       md_number_to_chars (p, use, (int) nbytes);
This page took 0.027366 seconds and 4 git commands to generate.