Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 7.0.6 - why the requirement of "id-expression"?
#2
The argument for 'id-expression' is that we wanted to keep the rule simple, whilst preventing i1 = s1 + s2; (a widening assignment).
We tried to enumerate the possible cases which were safe, but this got very complex, so we went to a simple case that was safe.

We will consider the rule in future to allow other safe cases, such as your example of class member access ("member-expression")
Posted by and on behalf of
the MISRA C++ Working Group
Reply


Messages In This Thread
RE: Rule 7.0.6 - why the requirement of "id-expression"? - by misra cpp - 10-01-2025, 01:24 PM

Forum Jump:


Users browsing this thread: 4 Guest(s)