我知道sizeof是一个运算符,它在编译时被计算为整数常量.但它似乎不能在#if预处理器指令中使用,如:
#if 4 == sizeof(int) typedef int Int32; #endif
(cygwin-gcc 3.4.4以及Visual C++ 6.0报告编译错误)
为什么不允许这样的使用?
c sizeof c-preprocessor
c ×1
c-preprocessor ×1
sizeof ×1