From 5add9b93d4c5365dd7e372741613864e2c549ae8 Mon Sep 17 00:00:00 2001 From: Simonas Kazlauskas Date: Mon, 16 Jan 2017 11:46:00 +0200 Subject: [PATCH] Fix UB in test helpers Macro expansion producing defined has undefined behavior in C/C++. --- src/rt/rust_test_helpers.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/rt/rust_test_helpers.c b/src/rt/rust_test_helpers.c index f2d9119a7d156..5900b21b6126a 100644 --- a/src/rt/rust_test_helpers.c +++ b/src/rt/rust_test_helpers.c @@ -269,10 +269,7 @@ LARGE_INTEGER increment_all_parts(LARGE_INTEGER li) { return li; } -#define DO_INT128_TEST !(defined(WIN32) || defined(_WIN32) || defined(__WIN32)) && \ - defined(__amd64__) - -#if DO_INT128_TEST +#if !(defined(WIN32) || defined(_WIN32) || defined(__WIN32)) && defined(__amd64__) unsigned __int128 identity(unsigned __int128 a) { return a;