diff options
author | Tom de Vries <tom@codesourcery.com> | 2017-11-12 16:07:30 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2017-11-12 16:07:30 +0000 |
commit | 2041a23a2ed58c7115bc8a942ee40efda0b72324 (patch) | |
tree | fcf4b7c09ffcb1d1963f2aab8e9cf726c9b1f8e9 /gcc | |
parent | 180b5580343dca1d8c70b060aaf3206f533e03d8 (diff) | |
download | gcc-2041a23a2ed58c7115bc8a942ee40efda0b72324.zip gcc-2041a23a2ed58c7115bc8a942ee40efda0b72324.tar.gz gcc-2041a23a2ed58c7115bc8a942ee40efda0b72324.tar.bz2 |
[riscv] Wrap ASM_OUTPUT_LABELREF in do {} while (0)
2017-11-12 Tom de Vries <tom@codesourcery.com>
* config/riscv/riscv.h (ASM_OUTPUT_LABELREF): Wrap in do {} while (0).
From-SVN: r254666
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/config/riscv/riscv.h | 15 |
2 files changed, 13 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2e46869..d888379 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 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. 2017-11-12 Tom de Vries <tom@codesourcery.com> diff --git a/gcc/config/riscv/riscv.h b/gcc/config/riscv/riscv.h index 91a9c33..fe09e84 100644 --- a/gcc/config/riscv/riscv.h +++ b/gcc/config/riscv/riscv.h @@ -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 |