As of this writing (but perhaps not for very much longer!) the four mainstream compilers on Godbolt Compiler Explorer give four different answers for this simple C++ program:
Turning procedural and structural knowledge into programs has established methodologies, but what about turning knowledge into probabilistic models? I explore a few examples of what such a process could look like.
This article sheds light on how warnings work in GCC, why some warnings are false, and when warnings might not be output. Also discussed are the trade-offs made when implementing checks in GCC.