This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH]: Fix compile time warning building ARM port of GAS
- From: Daniel Jacobowitz <drow at false dot org>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: Nick Clifton <nickc at redhat dot com>, binutils at sources dot redhat dot com
- Date: Wed, 1 Jun 2005 09:28:04 -0400
- Subject: Re: [PATCH]: Fix compile time warning building ARM port of GAS
- References: <m3oeaq1obl.fsf@redhat.com> <87d5r6jtvo.fsf@codesourcery.com>
On Wed, Jun 01, 2005 at 02:42:19AM -0700, Zack Weinberg wrote:
> > The problem was because of macros like this:
> >
> > #define TUE(mnem, op, top, nops, ops, ae, te) \
> > { #mnem, OPS##nops ops, OT_unconditional, 0x##op, 0x##top, ARM_VARIANT, \
> > do_##te ? THUMB_VARIANT : 0, do_##ae, do_##te }
> >
> > where the "do_##te ? THUMB_VARIANT : 0" always evaluates to
> > THUMB_VARIANT since do_##te must always exist - it is used to
> > initialise the last field in the structure being set up by the
> > macro. Hence the patch just removes the redundant tests.
>
> Sorry, that's not a redundant test. Look farther down the file, each
> of the Txx macros has a corresponding non-T macro, that invokes the T
> macro with 0 for the 'te' argument. Since md_assemble uses the
> tvariant field to decide whether it's got an encoding function to
> call, this patch will cause the assembler to crash on, e.g.
>
> .text
> .syntax unified
> .thumb
> rsc r0, r0, r0
>
> I can work with you to find another solution, but I'm not seeing these
> warnings. What compiler are you using?
Since I read Zack's message and didn't quite get it, here's a missing
clue:
#define do_0 0
--
Daniel Jacobowitz
CodeSourcery, LLC