|
|
|
|
|
by gpderetta
722 days ago
|
|
x/0 is not reached if the printf blocks forever, exits or return via an exceptional path (longjmp in C, exceptions in C++). Now specifically standard printf won't longjmp or exit (but glibc one can), but it still can block forever, so the compiler in practice can't hoist UB over opaque function calls. edit: this is in addition to the guarantees with regard to side effects that uecker says the C standard provides. |
|