A repository for a document that attempts to document the undefined behavior in versions of the C++ standard.
The C language standard provides, at the end of the document, an annex labeled J. Annex J lists most of the undefined behavior present within the language. This is good, however it has a few issues with it that I don't particularly like, the main one being that it does not provide examples of the undefined behavior being invoked. This sucks for people that learn best through seeing an example first. Nevertheless, this annex is better than being given nothing.
However, in the case of C++, the language standard provides no annex or anything of the sort regarding the undefined behavior in the language. This attempts to be a complement to the C++ standard documents that provides something somewhat like annex J. The entries within the document follow the given pattern
Title describing an undefined behavior.
Status of the undefined behavior (which standards it was defined in, and which it was undefined in).
Quotes from the standard describing the behavior.
If necessary due to ambiguity of the quotations, any further justification for the behavior being undefined.
Any relevant exceptions to the undefined behavior that may not be obvious in the provided quotes.
Quotes from the standard that allow for the described exceptions, if not present in the initial quotes from the standard.
Example(s) of the undefined behavior being invoked.
Building the Document
- Have a LaTeX environment installed (as well as pdflatex).
- Install any relevant packages needed to build the document (see the top of
main.texfor all packages used).
srcdirectory, or manually run
pdflatex mainthree times in the