Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 0.1.1 Example f4
#3
We didn't answer your first question: "Do you consider that the last increment of "j" violates Rule 0.1.1?"

The last increment to 'j' does not violate the rule. (Except when n==0) the statement performing the write has one other occurance in the loop which is read, and then observed before being overwritten.
Posted by and on behalf of
the MISRA C++ Working Group
Reply


Messages In This Thread
Rule 0.1.1 Example f4 - by cgpzs - 30-09-2026, 12:05 PM
RE: Rule 0.1.1 Example f4 - by misra cpp - 02-10-2026, 12:25 PM
RE: Rule 0.1.1 Example f4 - by misra cpp - 06-10-2026, 10:42 AM
RE: Rule 0.1.1 Example f4 - by cgpzs - 07-10-2026, 11:07 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)