[mips] Wrap ASM_OUTPUT_LABELREF in do {} while (0)
authorTom de Vries <tom@codesourcery.com>
Wed, 8 Nov 2017 08:51:52 +0000 (08:51 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Wed, 8 Nov 2017 08:51:52 +0000 (08:51 +0000)
2017-11-07  Tom de Vries  <tom@codesourcery.com>

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

From-SVN: r254521

gcc/ChangeLog
gcc/config/mips/mips.h

index b2aa4498703d58a5b4750f9f12c272c594267e6a..ed9a130637066946012c11045a512263d4a10be4 100644 (file)
@@ -1,3 +1,7 @@
+2017-11-07  Tom de Vries  <tom@codesourcery.com>
+
+       * config/mips/mips.h (ASM_OUTPUT_LABELREF): Wrap in "do {} while (0)".
+
 2017-11-07  Tom de Vries  <tom@codesourcery.com>
 
        * config/mips/mips.h (ASM_OUTPUT_CASE_END): Remove semicolon after
index c1fcb863134437d47a7df90c536ef4b5d2e93a73..bea2ce844ce9ebc2ab2ea5d1e12616897d5ff65b 100644 (file)
@@ -2566,12 +2566,15 @@ typedef struct mips_args {
 /* This handles the magic '..CURRENT_FUNCTION' symbol, which means
    'the start of the function that this code is output in'.  */
 
-#define ASM_OUTPUT_LABELREF(FILE,NAME)  \
-  if (strcmp (NAME, "..CURRENT_FUNCTION") == 0)                                \
-    asm_fprintf ((FILE), "%U%s",                                       \
-                XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); \
-  else                                                                 \
-    asm_fprintf ((FILE), "%U%s", (NAME))
+#define ASM_OUTPUT_LABELREF(FILE,NAME)                                 \
+  do {                                                                 \
+    if (strcmp (NAME, "..CURRENT_FUNCTION") == 0)                      \
+      asm_fprintf ((FILE), "%U%s",                                     \
+                  XSTR (XEXP (DECL_RTL (current_function_decl),        \
+                              0), 0));                                 \
+    else                                                               \
+      asm_fprintf ((FILE), "%U%s", (NAME));                            \
+  } while (0)
 \f
 /* Flag to mark a function decl symbol that requires a long call.  */
 #define SYMBOL_FLAG_LONG_CALL  (SYMBOL_FLAG_MACH_DEP << 0)