* [PATCH] gas: fold three as_warn() in emit_expr_with_reloc()
@ 2021-06-10 11:36 Jan Beulich
2021-06-11 14:14 ` Nick Clifton
0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2021-06-10 11:36 UTC (permalink / raw)
To: Binutils
Simply use the available abstraction instead of, effectively, trying to
open-code it.
gas/
2021-06-XX Jan Beulich <jbeulich@suse.com>
* read.c (emit_expr_with_reloc): Fold three as_warn().
--- a/gas/read.c
+++ b/gas/read.c
@@ -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);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] gas: fold three as_warn() in emit_expr_with_reloc()
2021-06-10 11:36 [PATCH] gas: fold three as_warn() in emit_expr_with_reloc() Jan Beulich
@ 2021-06-11 14:14 ` Nick Clifton
0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2021-06-11 14:14 UTC (permalink / raw)
To: Jan Beulich, Binutils
Hi Jan,
> gas/
> 2021-06-XX Jan Beulich <jbeulich@suse.com>
>
> * read.c (emit_expr_with_reloc): Fold three as_warn().
Approved - please apply.
Cheers
Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-11 14:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10 11:36 [PATCH] gas: fold three as_warn() in emit_expr_with_reloc() Jan Beulich
2021-06-11 14:14 ` Nick Clifton
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).