[sh] Wrap ASM_OUTPUT_ADDR_VEC_ELT in do {} while (0)
authorTom de Vries <tom@codesourcery.com>
Thu, 23 Nov 2017 15:03:39 +0000 (15:03 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Thu, 23 Nov 2017 15:03:39 +0000 (15:03 +0000)
2017-11-23  Tom de Vries  <tom@codesourcery.com>

* config/sh/sh.h (ASM_OUTPUT_ADDR_VEC_ELT): Wrap in "do {} while (0)".

From-SVN: r255100

gcc/ChangeLog
gcc/config/sh/sh.h

index c4c8287f2a79cfae6bb2c047190519c8ccd3c11f..39486ff2612427e76a5e72766e1f2b2f03072a7e 100644 (file)
@@ -1,3 +1,7 @@
+2017-11-23  Tom de Vries  <tom@codesourcery.com>
+
+       * config/sh/sh.h (ASM_OUTPUT_ADDR_VEC_ELT): Wrap in "do {} while (0)".
+
 2017-11-23  Tom de Vries  <tom@codesourcery.com>
 
        * config/ft32/ft32.h (ASM_OUTPUT_ADDR_VEC_ELT): Remove semicolon after
index f5d80da1451745e990461f5794c360878df62db2..82699cd70d30bf0f81ef480e1352b710b523f9ab 100644 (file)
@@ -1754,12 +1754,13 @@ extern bool current_function_interrupt;
     }
 
 /* Output an absolute table element.  */
-#define ASM_OUTPUT_ADDR_VEC_ELT(STREAM,VALUE)                                  \
-  if (! optimize || TARGET_BIGTABLE)                                   \
-    asm_fprintf ((STREAM), "\t.long\t%LL%d\n", (VALUE));               \
-  else                                                                 \
-    asm_fprintf ((STREAM), "\t.word\t%LL%d\n", (VALUE));
-
+#define ASM_OUTPUT_ADDR_VEC_ELT(STREAM,VALUE) \
+  do {                                                                 \
+    if (! optimize || TARGET_BIGTABLE)                                 \
+      asm_fprintf ((STREAM), "\t.long\t%LL%d\n", (VALUE));             \
+    else                                                               \
+      asm_fprintf ((STREAM), "\t.word\t%LL%d\n", (VALUE));             \
+  } while (0)
 \f
 /* A C statement to be executed just prior to the output of
    assembler code for INSN, to modify the extracted operands so