It&#x27;s not only an optimizer that could throw you off if you really are relying on overflowing an array&#x27;s bounds. While C doesn&#x27;t <i>require</i> bounds checks, it also doesn&#x27;t <i>prohibit</i> them, so a safety-oriented compiler could insert bounds checks (except in the special case in structs you mention, which by the standard has to be allowed). That exists in the real world too; the Intel C compiler can insert bound checks, though they aren&#x27;t enabled by default.