&quot;Undefined behavior&quot; means behavior that is not defined by the C standard. Things other than the C standard (secondary standards like POSIX, compiler documentation, hardware specifications, etc.) are free to define the behavior of any construct that&#x27;s not defined by the language standard.<p>And an optimizing compiler is free to transform its generated code based on the <i>assumption</i> that the code&#x27;s behavior is defined.