[gcc r12-3478] Fix multi-statment macro
Jan-Benedict Glaw
jbglaw@gcc.gnu.org
Mon Sep 13 10:08:48 GMT 2021
https://gcc.gnu.org/g:f42e95a830ab48e59389065ce79a013a519646f1
commit r12-3478-gf42e95a830ab48e59389065ce79a013a519646f1
Author: Jan-Benedict Glaw <jbglaw@ług-owl.de>
Date: Mon Sep 13 12:08:25 2021 +0200
Fix multi-statment macro
INIT_CUMULATIVE_ARGS() expands to multiple statements, which will break right
after an `if` statement. Wrap it into a block.
gcc/ChangeLog:
* config/alpha/vms.h (INIT_CUMULATIVE_ARGS): Wrap multi-statment
define into a block.
Diff:
---
gcc/config/alpha/vms.h | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/gcc/config/alpha/vms.h b/gcc/config/alpha/vms.h
index 2a9917cde62..0033b0004b3 100644
--- a/gcc/config/alpha/vms.h
+++ b/gcc/config/alpha/vms.h
@@ -145,9 +145,13 @@ typedef struct {int num_args; enum avms_arg_type atypes[6];} avms_arg_info;
#undef INIT_CUMULATIVE_ARGS
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \
- (CUM).num_args = 0; \
- (CUM).atypes[0] = (CUM).atypes[1] = (CUM).atypes[2] = I64; \
- (CUM).atypes[3] = (CUM).atypes[4] = (CUM).atypes[5] = I64;
+ do \
+ { \
+ (CUM).num_args = 0; \
+ (CUM).atypes[0] = (CUM).atypes[1] = (CUM).atypes[2] = I64; \
+ (CUM).atypes[3] = (CUM).atypes[4] = (CUM).atypes[5] = I64; \
+ } \
+ while (0)
#define DEFAULT_PCC_STRUCT_RETURN 0
More information about the Gcc-cvs
mailing list