Skip to content

Commit f492088

Browse files
authored
Merge pull request #12 from qwandor/patch-2
Fix typos and improve formatting
2 parents 7fb8e3b + 4c26704 commit f492088

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/undefined_behavior.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ There are a couple misconceptions about UB that often muddy the water when talki
174174
Undefined Behavior may be present even if the compiler does end up compiling the
175175
code according to the programmer's intent. A future version of the compiler may
176176
behave differently, or future changes to an innocuous portion of the code may
177-
cause it to fall to the other side of an invisible threshhold. Technically it
177+
cause it to fall to the other side of an invisible threshold. Technically it
178178
may even compile differently but only on Tuesdays, though that type of
179179
nondeterminism is generally rare.
180180

@@ -193,10 +193,10 @@ Firstly, some forms of UB just have to do with rules the underlying processor
193193
enforces.
194194

195195
But more than that, there are plenty of miscompiles that are hard to explain by
196-
simply thinking in terms why the optimizer would do such a thing.
196+
simply thinking in terms of why the optimizer would do such a thing.
197197

198-
This is because it's less about what the optimizer is "allowed to do" and more
199-
about what it is "allowed to assume". When a code has UB, the optimizer may
198+
This is because it's less about what the optimizer is allowed to _do_ and more
199+
about what it is allowed to _assume_. When a program has UB, the optimizer may
200200
make an incorrect assumption that snowballs into bigger and bigger incorrect
201201
assumptions that cause very unexpected behavior.
202202

0 commit comments

Comments
 (0)