Hacker News new | ask | show | jobs
by dgrunwald 57 days ago
The compiler is only allowed to do that when it can prove `puts` will return (i.e. it must prove `puts` does not call `exit`). In a world with SIGPIPE that shouldn't happen. (unless maybe the compiler can prove that there's enough space available in the stdlib IO buffers so that puts won't actually output anything. but then there's no obversable difference in behavior)
1 comments

It’s not required to prove puts will return, because it is allowed to assume the condition is never true, so puts should never be called.