Skip to content

Commit 71be854

Browse files
authored
[ub] Fix some formatting (#7828)
1 parent 94bbba6 commit 71be854

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

source/ub.tex

+6-6
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
};
3232

3333
X* make_x() {
34-
// The call to std::malloc can not implicitly create an object of type X
35-
// because X is not an implicit-lifetime class.
34+
// The call to \tcode{std::malloc} can not implicitly create an object of type \tcode{X}
35+
// because \tcode{X} is not an implicit-lifetime class.
3636
X* p = (X*)std::malloc(sizeof(struct X));
3737
p->a = 1; // undefined behavior, no set of objects give us defined behavior
3838
return p;
@@ -289,7 +289,7 @@
289289

290290
\pnum
291291
\ubxref{basic.start.main.exit.during.destruction} \\
292-
If std::exit is called to
292+
If \tcode{std::exit} is called to
293293
end a program during the destruction of an object with static or thread storage duration, the program has
294294
undefined behavior.
295295

@@ -305,7 +305,7 @@
305305
Exiter ex; //
306306

307307
int main() {}
308-
// Undefined behavior when destructor of static variable ex is called it will call std::exit
308+
// undefined behavior when destructor of static variable \tcode{ex} is called it will call \tcode{std::exit}
309309
\end{codeblock}
310310
\end{example}
311311

@@ -339,8 +339,8 @@
339339
B b;
340340

341341
int main() {}
342-
// Undefined behavior, static objects are destructed in reverse order, in this case a then b and
343-
// finally c. When the destructor of c is call it calls f() which passes through definition of
342+
// undefined behavior, static objects are destructed in reverse order, in this case \tcode{a} then \tcode{b} and
343+
// finally \tcode{c}. When the destructor of \tcode{c} is called, it calls \tcode{f()} which passes through the definition of
344344
// previously destroyed block-scope object
345345
\end{codeblock}
346346
\end{example}

0 commit comments

Comments
 (0)