在下面的C代码中,当检查if条件时,我得到了Misra警告,如下所示 The operand of the opeartor '=='do not have same essential type categorydefine timer_4sec (uint8)160
#define bool_rolltime (roll_time_count < timer_4sec) 在源文件中,file1.c我知道roll_time_count和tim
我目前正在处理一些MISRA问题,因此试图理解C中的整数转换规则。我正在违反MISRA-C 2004规则12.9一元减号运算符不应应用于其基础类型为无符号的表达式signed long int test = -1;
我理解没有负整数常量"-1",而是应用于整数常量但是,整数常量"1“是列表int、long int、无符号长int (直到C