Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MISRA C - Rule 12.12
#1
Just wanted to know if Line 3 in the following case is a violation for Rule 12.12 ...??

1. int i;
2. float f=2.1;
3. i=(int)f >>2; //Typecasting should actually take care of the bit implementation of floats

Also, If its a violation to Rule 12.12..Does that mean all typecasts (from float to any other type) should also be considered as violationg this rule..?
<t></t>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)