From: Ralf Jung Date: Mon, 15 Jul 2019 11:39:39 +0000 (+0200) Subject: fix typo X-Git-Url: https://git.ralfj.de/web.git/commitdiff_plain/c4b1c46b46d8b78098e4cac1cc9eb41dee2a4d3d?ds=inline fix typo --- diff --git a/personal/_posts/2019-07-14-uninit.md b/personal/_posts/2019-07-14-uninit.md index 314ca95..c6ee054 100644 --- a/personal/_posts/2019-07-14-uninit.md +++ b/personal/_posts/2019-07-14-uninit.md @@ -65,7 +65,7 @@ Compilers don't just want to annoy programmers. Ruling out operations such as comparison on uninitialized data is useful, because it means the compiler does not have to "remember" which exact bit pattern an uninitialized variable has! A well-behaved (UB-free) program cannot observe that bit pattern anyway. So each time an uninitialized variable gets used, we can just use *any* machine register---and for different uses, those can be different registers! -So, one time we "look" at `x` it can be at least 150, and then when we look at it again it is less than 120, even though `x` did not change. +So, one time we "look" at `x` it can be at least 150, and then when we look at it again it is at most 120, even though `x` did not change. `x` was just uninitialized all the time. That explains why our compiled example program behaves the way it does.