预处理器算法是否应该与编译目标的体系结构相匹配?

Should the preprocessor arithmetic match the architecture targeted by the compilation?

假设我有这个预处理器检查:

#if(-6 & 5)
    #error "No 2's complement signed int"
#endif

如果我从二进制补码机交叉编译到一个补码机,会发生什么情况。编译器会使用目标机器的算法,还是编译机器的算法?

谢谢

C 2018 6.10.1 4 说,对于 #if#elif 指令中的表达式求值:

… For the purposes of this token conversion and evaluation, all signed integer types and all unsigned integer types act as if they have the same representation as, respectively, the types intmax_t and uintmax_t defined in the header <stdint.h>

这些类型当然是在程序执行期间使用的,因此它们的行为是执行环境的行为。