Skip to content

Commit 9a19e01

Browse files
jensmaurerzygoloid
authored andcommitted
[basic.scope.pdecl] Fix example of self-referential initialization.
1 parent 08e5af6 commit 9a19e01

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

source/basic.tex

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,8 +836,9 @@
836836
unsigned char x = 12;
837837
{ unsigned char x = x; }
838838
\end{codeblock}
839-
Here the second \tcode{x} is initialized with its own (indeterminate)
840-
value.
839+
Here, the initialization of the second \tcode{x} has undefined behavior,
840+
because the initializer accesses the second \tcode{x}
841+
outside its lifetime\iref{basic.life}.
841842
\end{example}
842843

843844
\pnum

0 commit comments

Comments
 (0)