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:
commit
0825c96b14
@ -269,10 +269,7 @@ LARGE_INTEGER increment_all_parts(LARGE_INTEGER li) {
|
|||||||
return li;
|
return li;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DO_INT128_TEST !(defined(WIN32) || defined(_WIN32) || defined(__WIN32)) && \
|
#if !(defined(WIN32) || defined(_WIN32) || defined(__WIN32)) && defined(__amd64__)
|
||||||
defined(__amd64__)
|
|
||||||
|
|
||||||
#if DO_INT128_TEST
|
|
||||||
|
|
||||||
unsigned __int128 identity(unsigned __int128 a) {
|
unsigned __int128 identity(unsigned __int128 a) {
|
||||||
return a;
|
return a;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user