[riscv] Wrap ASM_OUTPUT_LABELREF in do {} while (0)
authorTom de Vries <tom@codesourcery.com>
Sun, 12 Nov 2017 16:07:30 +0000 (16:07 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Sun, 12 Nov 2017 16:07:30 +0000 (16:07 +0000)
2017-11-12  Tom de Vries  <tom@codesourcery.com>

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

From-SVN: r254666

gcc/ChangeLog
gcc/config/riscv/riscv.h

index 2e46869a765a1eeb1c4895394ede5fba23dbc479..d888379966d5d39a923a37b71526b843e1cc304e 100644 (file)
@@ -1,3 +1,7 @@
+2017-11-12  Tom de Vries  <tom@codesourcery.com>
+
+       * config/riscv/riscv.h (ASM_OUTPUT_LABELREF): Wrap in do {} while (0).
+
 2017-11-12  Tom de Vries  <tom@codesourcery.com>
 
        * config/elfos.h (ASM_OUTPUT_ASCII): Remove semicolon after macro body.
index 91a9c33543d225dc8f002d50f8bc0b7cf170a8c2..fe09e84e8953d24ba4d34217041cd798a0aa3057 100644 (file)
@@ -585,12 +585,15 @@ typedef struct {
 /* 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)
 
 #define JUMP_TABLES_IN_TEXT_SECTION 0
 #define CASE_VECTOR_MODE SImode