* c.texi (do-while Statement): Warn about do-while vs while confusion.

This commit is contained in:
Ineiev 2025-04-25 10:21:19 +00:00
parent 42e27e86f3
commit 55f2c0ba27
1 changed files with 6 additions and 0 deletions

6
c.texi
View File

@ -8233,6 +8233,12 @@ computes @var{test} and, if it is true (nonzero), that means to go
back and start over with @var{body}. If @var{test} is false (zero),
then the loop stops repeating and execution moves on past it.
@strong{Warning:} Human beings tend to confuse the @code{do}--@code{while}
statement with the @code{while} statement using the null statement
as its @var{body} (@pxref{Null Statement}). To avoid that, consistently
mark such constructs with a specific comment or with clearly different
indent styles.
@node break Statement
@subsection @code{break} Statement
@cindex @code{break} statement