Auto merge of #39095 - nagisa:fix-ub-in-testhelp, r=alexcrichton

Fix UB in test helpers

Macro expansion producing defined has undefined behavior in C/C++.
This commit is contained in:
bors 2017-01-17 10:10:32 +00:00
commit 0825c96b14

View File

@ -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;