Re:GCC undefined behaviors are getting wild
by littlestymaar on Monday November 28, 2022 @03:41AM
(#33771173)
But you talked about JavaScript, where the “heavy lifting” is in fact “assume that it's always true, and switch back a less optimized version if the assumption turns out to be false”. That's exactly the kind of things you cannot do in C, because people use C in contexts were JIT isn't an option.
[ Parent
| on HN ]
Sorry, my general point and my example didn't perfectly match.
For something better matching: have a look at things like Coverity for what you can recover with static analysis of existing C code.