We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5611dea commit 94e7e59Copy full SHA for 94e7e59
source/compatibility.tex
@@ -3047,7 +3047,7 @@
3047
taking the address of a dereferenced null or past-the-end pointer value
3048
is well-defined in C (and yields the original pointer value),
3049
but results in undefined behavior in \Cpp{}.
3050
-For example:
+\begin{example}
3051
\begin{codeblock}
3052
void f() {
3053
char *p = nullptr;
@@ -3057,6 +3057,7 @@
3057
int *q = &a[5]; // well-defined in C, undefined behavior in \Cpp{}
3058
}
3059
\end{codeblock}
3060
+\end{example}
3061
\rationale
3062
Consistent treatment of lvalues in \Cpp{}.
3063
\effect
0 commit comments