This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 3/6] DWARF-5 basic functionality
On Wed, 22 Feb 2017 12:36:18 +0100, Nick Clifton wrote:
> > if (compunit.cu_version != 2
> > && compunit.cu_version != 3
> > - && compunit.cu_version != 4)
> > + && compunit.cu_version != 4
> > + && compunit.cu_version != 5)
>
> There are going to be lots of these range checks in readelf now. You might
> as well add a macro, eg IN_RANGE(LOW,HIGH), and use that to make the code
> shorter.
As you made it optional I have used:
- if (compunit.cu_version != 2
- && compunit.cu_version != 3
- && compunit.cu_version != 4)
+ if (compunit.cu_version < 2 || compunit.cu_version > 5)
Thanks,
Jan