Reitter: Answering the question: "How do I develop an app for GNOME?"
Posted Feb 7, 2013 11:46 UTC (Thu) by khim
In reply to: Reitter: Answering the question: "How do I develop an app for GNOME?"
Parent article: Reitter: Answering the question: "How do I develop an app for GNOME?"
You assume people write program to the spec. Well, newsflash to you: they don't. The very fact that both GCC and LLVM are trying (and failing) to catch a lot of undefined behaviors shows that people don't write to the spec. People write code, they write tests, if they pass - they are happy. That's it.
If program triggers implementation-defined behavior then tests are usually enough to catch problems (because compiler may do different thing from what the programmer expects but it consistently does different thing) while with undefined behavior compiler is absolutely free to do one thing in one case and completely different thing in another case. Which means that program may suddenly crash after compiler upgrade - and you have no idea why.
to post comments)