How to know if __uint128_t is defined [duplicate]
问题 This question already has answers here : Is there a 128 bit integer in gcc? (3 answers) Closed 8 months ago . We can use the preprocessor to know if unsigned long long is defined: #include <limits.h> #ifndef ULLONG_MAX typedef unsigned long t_mask; #else typedef unsigned long long t_mask; #endif But how to know if __uint128_t is defined? 回答1: You can try the following. I do not know how reliable this is, but it might be the easiest way. #ifdef __SIZEOF_INT128__ // do some fancy stuff here