&gt; Having some undefined behavior in your code is just a bug, it has nothing to do with being complicated or compiling to machine code.<p>In theory, yes. In practice, all C&#x2F;C++ programs have undefined behavior in them, so you have to understand what compilers do to <i>really</i> understand your code.<p>&gt; It&#x27;s not nearly as complex, in fact there are many people who understand quite well what the code compiles to.<p>Not true in my experience. The only people who really understand it are, by and large, compiler developers. There are very few compiler developers.<p>&gt; Try guessing what Java compiles to.<p>I know what Java compiles to more or less as well as I know what C++ compiles to. The only real difference is in GC (which is quite simple--inline a nursery bump and fall back to a malloc-like slow path if it fails) and ICs, which are a lot less complicated than things like alias-analysis-sensitive load forwarding.