|
|
|
|
|
by IshKebab
305 days ago
|
|
This asserts that UB was deliberately created for optimisation purposes; not to handle implementation differences. It doesn't provide any evidence though and that seems unlikely to me. The spec even says: > behavior, upon use of a nonportable or erroneous program construct or of erroneous data, for which this International Standard imposes no requirements No motivation is given that I could find, so the actual difference between undefined and implementation defined behaviour seems to be based on whether the behaviour needs to be documented. |
|
Also the C spec has always been a pragmatic afterthought, created and maintained to establish at least a minimal common feature set expected of C compilers.
The really interesting stuff still only exists outside the spec in vendor language extensions.