This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: gas/10766: Variable defined inside code in gas/config/tc-i386.c
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: binutils at sources dot redhat dot com
- Date: Tue, 13 Oct 2009 09:44:17 -0700
- Subject: PATCH: gas/10766: Variable defined inside code in gas/config/tc-i386.c
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
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++;