Skip to content

Commit 311819a

Browse files
committed
Python/dtoa.c: protect macros expansion via do { ... } while (0) constructions
1 parent c5d97ae commit 311819a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Python/dtoa.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,11 @@ typedef uint64_t ULLong;
169169
/* End Python #define linking */
170170

171171
#ifdef DEBUG
172-
#define Bug(x) {fprintf(stderr, "%s\n", x); exit(1);}
172+
#define Bug(X) \
173+
do { \
174+
fprintf(stderr, "%s\n", X); \
175+
exit(1); \
176+
} while (0)
173177
#endif
174178

175179
typedef union { double d; ULong L[2]; } U;

0 commit comments

Comments
 (0)