3 ms·
Because in practice, compilers are expected to do more than the language standard requires of them, and this resulting behavior is very dangerous.
by kadoban 6y ago
Because in practice, compilers are expected to do more than the language standard requires of them, and this resulting behavior is very dangerous.
- souprock 6y agoThe trouble dates back to the original standardization of C. An expectation of pre-standard C was left out of the standard: behavior of things like integer overflow could be determined by looking at the CPU documentation. It would have been difficult to turn that into an unambiguous requirement in the standard, and it is unlikely that people imagined what future compilers might do. In the decades since, benchmark competition has given us the hostile mess we have today.