You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But fail to give any rewrite rule for the other kind of while statement. The result is both redundant and underspecified.
We could replace this with:
A while statement is equivalent to
label:
if (condition) {
statement
goto label;
}
... and make the wording simpler, less redundant, and more complete.
(Open question: is it useful to retain the braces around the outside of the if-statement in order to make it obvious that an else cannot bind to a while?)
The text was updated successfully, but these errors were encountered:
Yes on both counts -- the simplification seems obvious in retrospect, and keeping the "else" part clear is valuable (especially given the notorious absence of a "while-else" construct in C++).
In [stmt.while], we say:
But fail to give any rewrite rule for the other kind of
while
statement. The result is both redundant and underspecified.We could replace this with:
... and make the wording simpler, less redundant, and more complete.
(Open question: is it useful to retain the braces around the outside of the if-statement in order to make it obvious that an
else
cannot bind to awhile
?)The text was updated successfully, but these errors were encountered: