Quote Originally Posted by Ibidem View Post
Also, GCC gets some of its speed by doing optimizations that never should happen (for example, one time there was a "security bug" in the kernel: GCC optimized out a null pointer check)
Well, I am totally pro-GCC. At the same time, I don't mean LLVM is bad. The fact that LLVM is hanged on Apple is bad though.

Why I think GCC is better even though its optimization is buggy?
1) That GCC does wrong optimization does not mean other compilers don't.
How about a compiler that does not do optimization? That would be like that 0-CPU-kernel April fools joke. Sure we can make a computer secure by removing optimization. we can also remove c language as well, to prevent optimization error as well as programmer's run-time error. What I want to say is removing the optimization is not a solution, but a regression. Furthermore, history tells us such compilers should still have bugs.
2) GCC is extensively used on all systems. It is no surprising that we find a bug in it, just like any other programs. However, even when it is been so extensively used, yet we rarely find bugs in it. This is a solid proof that it is, surprisingly, bug-proof.
3) A lot more bugs are produced not by optimization, but by programmers themselves. So who should be blamed more?