Re:Undefined behavior in C is a reading error
by vyodaiken on Thursday May 20, 2021 @03:16PM
(#27225737)
It is completely useless to allow compilers to assume false things about the code they generate.
[ Parent
| on HN ]
Re:Undefined behavior in C is a reading error
by fooker on Thursday May 20, 2021 @06:33PM
(#27228266)
It’s not useless.
The assumption is not false if the program doesn’t have undefined behavior.
The assumption allows the code to be a few times faster.
To disallow this assumption would inhibit these optimizations.