PATCH: gas/10766: Variable defined inside code in gas/config/tc-i386.c

H.J. Lu hongjiu.lu@intel.com
Tue Oct 13 16:44:00 GMT 2009


I checked in this patch.


H.J.
---
2009-10-13  H.J. Lu  <hongjiu.lu@intel.com>

	PR gas/10766
	* config/tc-i386.c (build_modrm_byte): Declare exp earlier.

diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 5c288ea..3c5f36d 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -4873,6 +4873,7 @@ build_modrm_byte (void)
   if (vex_3_sources)
     {
       unsigned int nds, reg;
+      expressionS *exp;
 
       if (i.tm.opcode_modifier.veximmext
 	  && i.tm.opcode_modifier.immext)
@@ -4896,7 +4897,7 @@ build_modrm_byte (void)
 
       /* Generate an 8bit immediate operand to encode the register
 	 operand.  */
-      expressionS *exp = &im_expressions[i.imm_operands++];
+      exp = &im_expressions[i.imm_operands++];
       i.op[i.operands].imms = exp;
       i.types[i.operands] = imm8;
       i.operands++;



More information about the Binutils mailing list