Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
question to examples of rule 6.12.2
#3
MISRA-C meeting 22-8-2006

Code:
x = y = y = z;

There is both human confusion and undefined behaviour associated with nested assignment statements.

See ISO C 9899:1990 6.3 para. 2.

Keep it simple and write

Code:
y = z;
x = y;
Posted by and on behalf of the MISRA C Working Group


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)