This is the mail archive of the binutils@sourceware.org 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]

PATCH: Fix GCC 4.6 warnings


Hi,

GCC 4.6 warns "index" shadows a global symbol.  I checked in
this patch.

H.J.
---
Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/opcodes/ChangeLog,v
retrieving revision 1.1737
diff -u -p -r1.1737 ChangeLog
--- ChangeLog	29 Jun 2011 20:42:48 -0000	1.1737
+++ ChangeLog	29 Jun 2011 20:45:52 -0000
@@ -1,3 +1,8 @@
+2011-06-29  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* tilegx-opc.c (find_opcode): Replace "index" with "i".
+	* tilepro-opc.c (find_opcode): Likewise.
+
 2011-06-29  Richard Sandiford  <rdsandiford@googlemail.com>
 
 	* mips16-opc.c (jalrc, jrc): Move earlier in file.
Index: tilegx-opc.c
===================================================================
RCS file: /cvs/src/src/opcodes/tilegx-opc.c,v
retrieving revision 1.1
diff -u -p -r1.1 tilegx-opc.c
--- tilegx-opc.c	13 Jun 2011 15:18:53 -0000	1.1
+++ tilegx-opc.c	29 Jun 2011 20:45:52 -0000
@@ -7976,19 +7976,19 @@ const char * const tilegx_register_names
 static const struct tilegx_opcode *
 find_opcode (tilegx_bundle_bits bits, const unsigned short *table)
 {
-  int index = 0;
+  int i = 0;
 
   while (1)
     {
-      unsigned short bitspec = table[index];
+      unsigned short bitspec = table[i];
       unsigned int bitfield =
 	((unsigned int)(bits >> (bitspec & 63))) & (bitspec >> 6);
 
-      unsigned short next = table[index + 1 + bitfield];
+      unsigned short next = table[i + 1 + bitfield];
       if (next <= TILEGX_OPC_NONE)
 	return & tilegx_opcodes[next];
 
-      index = next - TILEGX_OPC_NONE;
+      i = next - TILEGX_OPC_NONE;
     }
 }
 
Index: tilepro-opc.c
===================================================================
RCS file: /cvs/src/src/opcodes/tilepro-opc.c,v
retrieving revision 1.1
diff -u -p -r1.1 tilepro-opc.c
--- tilepro-opc.c	13 Jun 2011 15:18:53 -0000	1.1
+++ tilepro-opc.c	29 Jun 2011 20:45:52 -0000
@@ -10103,19 +10103,19 @@ const struct tilepro_opcode *
 find_opcode (tilepro_bundle_bits bits, tilepro_pipeline pipe)
 {
   const unsigned short *table = tilepro_bundle_decoder_fsms[pipe];
-  int index = 0;
+  int i = 0;
 
   while (1)
     {
-      unsigned short bitspec = table[index];
+      unsigned short bitspec = table[i];
       unsigned int bitfield =
 	((unsigned int) (bits >> (bitspec & 63))) & (bitspec >> 6);
-      unsigned short next = table[index + 1 + bitfield];
+      unsigned short next = table[i + 1 + bitfield];
 
       if (next <= TILEPRO_OPC_NONE)
 	return &tilepro_opcodes[next];
 
-      index = next - TILEPRO_OPC_NONE;
+      i = next - TILEPRO_OPC_NONE;
     }
 }
 


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