4 ms·
Is there a way to avoid undefined behavior Im C then? Could we write a new C compiler that adds some checks and fixes (e.g. raise documented exceptions) to each
by elnatro 5mo ago
Is there a way to avoid undefined behavior Im C then? Could we write a new C compiler that adds some checks and fixes (e.g. raise documented exceptions) to each undefined behavior?
- u1hcw9nx 5mo agoThat post is just a hyperbolic rhetorical piece, not even a good technical shade. There are plenty of tools that restrict C into defined behavior subset. HN is just not aware of them. NASA, Aerospace and car industry are big customers, static analyzers and compilers. Good open source ones: Frama-C IKOS (from NASA)
- elnatro 5mo agoIt’s been a while since I programmed in C. Thank you for these resources.
- saagarjha 5mo agoNot all of them but there are many tools that can try to define behavior for this code to help shake them out of your codebase.
- peterfirefly 5mo agoubsan. Doesn't catch all of it.
- elnatro 4mo agoWill take a look thanks!