Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

WIP: [std] Add Annex for undefined and IFNDR behavior #7826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 21 commits into
base: main
Choose a base branch
Loading
from
Draft
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
2ed9326
[std] Add Annex for undefined and IFNDR behavior
jensmaurer Apr 5, 2025
6e12efa
[class.cdtor] Remove duplicate UB labels
jensmaurer Apr 5, 2025
f80cd9c
[expr.delete] Remove duplicate UB label
jensmaurer Apr 11, 2025
d92a145
[conv.fpint] Remove duplicate UB label
jensmaurer Apr 11, 2025
9d19eae
[ifndr.lex] Replace C++ with \Cpp
jensmaurer Apr 5, 2025
428d627
[ub,ifndr] Fix column alignment of comments
jensmaurer Apr 5, 2025
29f2045
[ifndr] Fix cross-references
jensmaurer Apr 5, 2025
2115438
[ub] Replace non-ASCII chars
jensmaurer Apr 5, 2025
20ffb6e
[check] Handle ub/ifndr labels
jensmaurer Apr 6, 2025
2ce67b5
[check] Exclude [ub] and [ifndr] from sibling checking for now
jensmaurer Apr 11, 2025
1372087
[ub.cpp.concat] Remove universal-character-name formation from ##; no…
jensmaurer Apr 5, 2025
51fd05f
[ifndr] Use codeblocktu
jensmaurer Apr 6, 2025
2be6676
Rename label expr.ass.overlap to expr.assign.overlap
jensmaurer Apr 13, 2025
94bbba6
[ub.basic.stc.dynamic] Fix typo
jensmaurer Apr 14, 2025
71be854
[ub] Fix some formatting (#7828)
jensmaurer Apr 22, 2025
a6064c6
Remove class.dtor.not.class.type (#7835)
jensmaurer Apr 23, 2025
0788337
Remove incorrect class.union.assignment.not.start.lifetime (#7833)
jensmaurer Apr 23, 2025
3c759d1
[ub.general,ifndr.general] Avoid hanging paragraphs by introducing 'G…
jensmaurer May 4, 2025
88a6384
[ub] Add many missing entries to UB annex (#7864)
notadragon May 14, 2025
35381f1
[conv.fpint] Remove unreferenced \ubdef that causes an undefined symb…
jensmaurer May 16, 2025
13307cb
[ub] small fixes to examples (#7890)
notadragon May 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[ub] Fix some formatting (#7828)
  • Loading branch information
jensmaurer authored Apr 22, 2025
commit 71be854ed7c39a2e1a31ecc1036ceddfb5307d43
12 changes: 6 additions & 6 deletions 12 source/ub.tex
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
};

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

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

Expand All @@ -305,7 +305,7 @@
Exiter ex; //

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

Expand Down Expand Up @@ -339,8 +339,8 @@
B b;

int main() {}
// Undefined behavior, static objects are destructed in reverse order, in this case a then b and
// finally c. When the destructor of c is call it calls f() which passes through definition of
// undefined behavior, static objects are destructed in reverse order, in this case \tcode{a} then \tcode{b} and
// finally \tcode{c}. When the destructor of \tcode{c} is called, it calls \tcode{f()} which passes through the definition of
// previously destroyed block-scope object
\end{codeblock}
\end{example}
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.