我正在用 ARM 编译器为安卓手机编译调制解调器代码。
我收到以下错误:
function "typeof" declared implicitly
然后我虽然我应该使用__typeof__
. 但是我得到了同样的错误:</p>
function "__typeof__" declared implicitly
我什至试过__typeof
。但它们都不起作用。
为什么?
编译器是 RVDS 5.01。命令行包含在某些脚本中。
错误信息是:
"/opt2/huanglianjun/PD1401V-modem-1.2.1.c1/boot_images/core/storage/ext4/src/common/div64.h", line 47:
Error: #223-D: function "typeof" declared implicitly.
代码是:
#define do_div(n,base) do{ \
uint32_t __base = (base); \
uint32_t __rem; \
(void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
if (((n) >> 32) == 0) { \
__rem = (uint32_t)(n) % __base; \
(n) = (uint32_t)(n) / __base; \
} else \
__rem = __div64_32(&(n), __base); \
__rem; \
}while(0)