Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Making constants in MISRA compliant C++
#3
Did you know you can compare against PC-LINT for free?
See http://www.gimpel-online.com/OnlineTesting.html.
Be sure to write //lint -indirect(au-misra-cpp-alt.lnt) at the top of your sample code to get MISRA C++ 2008 checks.
From my experience, all these tools either suffer from false positives or missing checks or both.
In your case no violation of 4-5-2 is reported and after reading the rule again i agree.
Also, number 2) is not a violation of 3-1-1 if the constant is in a header file, initialized with a literal and thus can be replaced at compile-time (no storage allocated).
<t></t>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)