loongarch gcc-4.9 build error

Alan Modra <[email protected]>
Newsgroups gmane.comp.gnu.binutils
Message-ID <[email protected]>
gas/config/tc-loongarch.c: In function ‘md_apply_fix’:
gas/config/tc-loongarch.c:1886:7: error: a label can only be part of a statement and a declaration is not a statement
       unsigned int subtype;
       ^

	* config/tc-loongarch.c (md_apply_fix <BFD_RELOC_LARCH_CFA>):
	Avoid gcc-4.9 error.

diff -w shown, actual patch indents the block.

diff --git a/gas/config/tc-loongarch.c b/gas/config/tc-loongarch.c
index e67394c460c..bd7d8dabb7a 100644
--- a/gas/config/tc-loongarch.c
+++ b/gas/config/tc-loongarch.c
@@ -1883,6 +1883,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
       break;
 
     case BFD_RELOC_LARCH_CFA:
+      {
 	unsigned int subtype;
 	fragS *opfrag = (fragS *) fixP->fx_frag->fr_opcode;
 	subtype = bfd_get_8 (NULL, opfrag->fr_literal + fixP->fx_where);
@@ -1947,6 +1948,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
 
 	if (fixP->fx_addsy == NULL)
 	  fixP->fx_done = 1;
+      }
       break;
 
     case BFD_RELOC_LARCH_B16:

-- 
Alan Modra
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.