[PATCH]: Fix compile time warning building ARM port of GAS
Daniel Jacobowitz
drow@false.org
Wed Jun 1 13:28:00 GMT 2005
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
More information about the Binutils
mailing list