This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]: Fix compile time warning building ARM port of GAS


Hi Zack,

> Daniel Jacobowitz wrote:
> Since I read Zack's message and didn't quite get it, here's a missing
> clue:
> #define do_0 0

Ah! Thanks Daniel, I had missed that.

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.

OK, in which case we need to fix this non-T macros. What do you think of the attached patch ?


I can work with you to find another solution, but I'm not seeing these
warnings.  What compiler are you using?

I am using a 3.4 based version distributed by RedHat to some of our customers:


gcc (GCC) 3.4-gnupro-04r2-2

Cheers
  Nick
Index: gas/config/tc-arm.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-arm.c,v
retrieving revision 1.206
diff -c -3 -p -r1.206 tc-arm.c
*** gas/config/tc-arm.c	1 Jun 2005 08:18:42 -0000	1.206
--- gas/config/tc-arm.c	3 Jun 2005 11:05:44 -0000
*************** static const struct asm_cond conds[] =
*** 8027,8038 ****
      THUMB_VARIANT, do_##ae, do_##te }
  
  /* ARM-only variants of all the above.  */
! #define CE(mnem,  op, nops, ops, ae) TCE(mnem,  op, 0, nops, ops, ae, 0)
! #define C3(mnem,  op, nops, ops, ae) TC3(mnem,  op, 0, nops, ops, ae, 0)
! #define CM(m1,m2, op, nops, ops, ae) TCM(m1,m2, op, 0, nops, ops, ae, 0)
! #define UE(mnem,  op, nops, ops, ae) TUE(mnem,  op, 0, nops, ops, ae, 0)
! #define UF(mnem,  op, nops, ops, ae) TUF(mnem,  op, 0, nops, ops, ae, 0)
! #define do_0 0
  
  /* Thumb-only, unconditional.  */
  #define UT(mnem,  op, nops, ops, te) TUE(mnem,  0, op, nops, ops, 0, te)
--- 8027,8071 ----
      THUMB_VARIANT, do_##ae, do_##te }
  
  /* ARM-only variants of all the above.  */
! #define CE(mnem,  op, nops, ops, ae)	\
!   { #mnem, OPS##nops ops, OT_csuffix, 0x##op, 0x0, ARM_VARIANT, 0, do_##ae, NULL }
! 
! #define C3(mnem, op, nops, ops, ae)	\
!   { #mnem, OPS##nops ops, OT_cinfix3, 0x##op, 0x0, ARM_VARIANT, 0, do_##ae, NULL }
! 
! #define xCM_(m1, m2, m3, op, nops, ops, ae)	\
!   { #m1 #m2 #m3, OPS##nops ops, \
!     sizeof(#m2) == 1 ? OT_odd_infix_unc : OT_odd_infix_0 + sizeof(#m1) - 1, \
!     0x##op, 0x0, ARM_VARIANT, 0, do_##ae, NULL }
! 
! #define CM(m1, m2, op, nops, ops, ae)	\
!   xCM_(m1,   , m2, op, nops, ops, ae),	\
!   xCM_(m1, eq, m2, op, nops, ops, ae),	\
!   xCM_(m1, ne, m2, op, nops, ops, ae),	\
!   xCM_(m1, cs, m2, op, nops, ops, ae),	\
!   xCM_(m1, hs, m2, op, nops, ops, ae),	\
!   xCM_(m1, cc, m2, op, nops, ops, ae),	\
!   xCM_(m1, ul, m2, op, nops, ops, ae),	\
!   xCM_(m1, lo, m2, op, nops, ops, ae),	\
!   xCM_(m1, mi, m2, op, nops, ops, ae),	\
!   xCM_(m1, pl, m2, op, nops, ops, ae),	\
!   xCM_(m1, vs, m2, op, nops, ops, ae),	\
!   xCM_(m1, vc, m2, op, nops, ops, ae),	\
!   xCM_(m1, hi, m2, op, nops, ops, ae),	\
!   xCM_(m1, ls, m2, op, nops, ops, ae),	\
!   xCM_(m1, ge, m2, op, nops, ops, ae),	\
!   xCM_(m1, lt, m2, op, nops, ops, ae),	\
!   xCM_(m1, gt, m2, op, nops, ops, ae),	\
!   xCM_(m1, le, m2, op, nops, ops, ae),	\
!   xCM_(m1, al, m2, op, nops, ops, ae)
! 
! #define UE(mnem, op, nops, ops, ae)	\
!   { #mnem, OPS##nops ops, OT_unconditional, 0x##op, 0, ARM_VARIANT, 0, do_##ae, NULL }
! 
! #define UF(mnem, op, nops, ops, ae)	\
!   { #mnem, OPS##nops ops, OT_unconditionalF, 0x##op, 0, ARM_VARIANT, 0, do_##ae, NULL }
! 
! #define do_0 NULL
  
  /* Thumb-only, unconditional.  */
  #define UT(mnem,  op, nops, ops, te) TUE(mnem,  0, op, nops, ops, 0, te)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]