Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Violations of rules 11.1, 11.2, 11.3, 11.4
#6
line 2 is indeed a violation of Rule 11.3. The rule text recognises that there are circumstances, such as accessing hardware features, in which it is necessary to cast an integer to a pointer.

The recommendation, as also made by William Forbes, is to deviate Rule 11.3 in this case. Note that a cast via (void *) is still a violation of rule 11.3
Posted by and on behalf of the MISRA C Working Group
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)