5 ms·
To be fair, the original author does acknowledge at the end that the title is hyperbole. Still, given that the compiler almost always seems to be right in thes
by Chris_Newton 12y ago
To be fair, the original author does acknowledge at the end that the title is hyperbole.
Still, given that the compiler almost always seems to be right in these cases, it’s surprising just how often even our trusty C compilers do have bugs. There is at least one well established project trying to formally verify a compiler to prevent that problem, apparently with considerable success already:
http://compcert.inria.fr/ http://compcert.inria.fr/
Having once spent a lot of time trying to track down a bug in some floating point code, only to find that the optimizer had tried to use one more floating point register than it actually had available something like ten levels down the call stack from where the error was being observed, I wish such projects the best of luck and look forward to a time when all our development tools are similarly trustworthy.