Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 10.5 clarification
#3
I don't think the first statement is entirely accurate. There are several rules which pertain to narrower and wider types and so most definitely depend on the implemented size of types for a given machine. For these rules (10.1 for instance) it seems practical to require the code to be rechecked for misra violations using the types defined for that machine.

The issue here is also that some expressions which appear to be compliant will also start to fail. For instance, here is an example from the Exemplar test suite:

typedef int uint16_t;
uint16_t u16r;

u16r = 0x1234U 4; /* Not compliant */

This example is compliant on a machine with a 16 bit int because the underlying type of (u16a
<t></t>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)