Emitting warnings and errors mostly works fine for undefined behaviors, the real problem is with implementation-defined behaviors.<p>Let&#x27;s say that, on the pathological compiler, it&#x27;s documented that sizeof(int) is 4, and chars are signed if the number of seconds in the current minute is even, otherwise sizeof(int) is 5 and chars are unsigned. If your code compiles and works with either setup, it&#x27;s probably correct and portable.<p>It&#x27;s not really feasible for programmers to avoid implementation-defined things like sizeof(int) varying across implementations, not is it feasible for compilers to detect assumptions made about the implementation&#x27;s definition in the program. The existence of a pathological compiler would make it far easier to write programs that work across all implementations.<p>It&#x27;s true that working with unpredictable systems is a nightmare, but that&#x27;s precisely the nature of undefined and implementation-defined behavior in C. The existence of a pathological compiler would merely allow developers to work through these issues on a single machine, which would be an improvement on needing to obtain a variety of compilers and platforms test with to find these issues.