This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Commit: Fix unsigned vs signed comparisons in SH code
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: binutils at sourceware dot org
- Date: Tue, 26 Nov 2019 16:32:09 +0100
- Subject: Re: Commit: Fix unsigned vs signed comparisons in SH code
- References: <87o8wyivfr.fsf@redhat.com>
On Nov 26 2019, Nick Clifton wrote:
> It seems that recent versions of clang have a new warning that catches
> code like this:
>
> if (sym_value < (bfd_vma) -0x1000 || sym_value >= 0x1000)
Why is that a unsigned vs signed comparison? Both operands are of type
bfd_vma.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."