20-10-2016, 09:35 AM
Code:
#include
extern uint8_t x;
void foo(void)
{
switch (x)
{
case -1:/*violates 10.3 -> as a result, this case is unreachable code because of silent integer promotion*/
break;
}
}
<t></t>
Welcome to the new MISRA discussion forum, if you were previously a member of our forums you may need to reset your password.
Rule 10.3, conversion of constant expression
|
« Next Oldest | Next Newest »
|
Messages In This Thread |