Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added an exceuption for accessing a vriable through an lvalue expression of unsigned char and added nce/cs pair for compatibility with TS 17961

Modifying a variable through a pointer of an incompatible type (other than unsigned char) can lead to unpredictable results. This is often caused by a violation of aliasing rules. C, Section 6.5, para. 7 [ISO/IEC 9899:2011], specifies those circumstances in which an object may or may not be aliased.

...

Accessing an object by means of any other lvalue expression (other than unsigned char) results in undefined behavior . See undefined behavior 34 of Annex J.

...