C\C++ specifications leave out a large number of behaviors open for compilers to implement in their own way. There are a number of questions that always keep getting asked here about the same and we have some excellent posts about it:https://stackoverflow.com/questions/367633/what-are-all-the-common-undefined-behaviour-that-a-c-programmer-should-know-abohttps://stackoverflow.com/questions/4105120/what-is-undefined-behaviorhttps://stackoverflow.com/questions/4176328/undefined-behavior-and-sequence-pointsMy question is not about what undefined behavior is, or is it really bad. I do know the perils and most of the relevant undefined behavior quotes from the standard, so please refrain from posting answers about how bad it is. This question is about the philosophy behind leaving out so many behaviors open for compiler implementation.I read an excellent blog post that states that performance is the main reason. I was wondering if performance is the only criteria for allowing it, or are there any other factors which influence the decision to leaving things open for compiler implementation?If you have any examples to cite about how a particular undefined behavior provides sufficient room for compiler to optimize, please list them. If you know of any other factors other than performance, please back your answer with sufficient detail.If you do not understand the question or do not have sufficient evidences/sources to back your answer, please do not post broadly speculating answers.
Philosophy behind Undefined Behavior
c++;c;philosophy;c++11;undefined behavior