← Back to context

Comment by AlotOfReading

1 day ago

C has had a catalog of undefined behavior since C99, Annex J. There's sample code demonstrating all cases too.

It's worth noting (as the report itself does) that these sorts of lists can only document explicitly undefined behavior, and not the much larger universe of implicitly undefined behavior. So they're not strictly all possible UB, just the most important cases.

I believe the aim of this C++ paper is to identify all possible UB in the standard. They mention the possibility of implicit UB but take the view that if that exists, that means the standard didn't sufficiently specify what to do in situation X, i.e. it's a bug in the standard that needs a fix.