4 ms·
Is there hope that we could some day achieve an exhaustive lists of all undefined behavior that C programmers need to be aware of? I realize no one really know
by tux3 3y ago
Is there hope that we could some day achieve an exhaustive lists of all undefined behavior that C programmers need to be aware of?
I realize no one really knows today, but is there a path?
- trws 3y agoNo. It would require listing not just every place the standard states undefined behavior is the result, but also every corner case not covered by the spec, or that is under-specified. It’s possible to document known instances, but never to document all possible sources of undefined or unspecified behavior.
- quelsolaar 3y agoThw C standard has a list of all known UBs. We don't know if the list is complete, because the C standard makes anything not defined by omission UB, so its possible to discover new UB. The language is however pretty thoroughly explored.