Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 13.3 incr/decr op in initialization
#2
The examples for Rule 13.3 state:
Code:
The expression:
u8a = u8b++
is non-compliant.

The glossary also clarifies that assignment includes Using an expression to initialize all or part of an object.

From this, the intent of Rule 13.3 (Advisory) is that use of ++ in an initialization is non-compliant.
Posted by and on behalf of the MISRA C Working Group
Reply


Messages In This Thread
RE: Rule 13.3 incr/decr op in initialization - by misra-c - 20-11-2025, 12:39 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)