|
|
|
|
|
by dooglius
1874 days ago
|
|
The source code may have had UB, but the compiled program could nevertheless have been bug-free. > Any code that invokes UB is not a valid C program, regardless of implemention. I disagree. UB is defined (3.4.3) merely as behavior the standard imposes no requirements upon. The definition does not preclude an implementation from having reasonable behavior for situations the standard considers undefined. This nuance is very important for the topic at had because many programs are written for specific implementations, not specs, and doing this is completely reasonable. |
|