Skip to content

Commit a33e505

Browse files
authored
[C99] Update documentation for scope of variables in loops; NFC (#154744)
I tracked down the document which changed the way variables are handled in for loops for C99, it was the same document that allowed mixing code and declarations but the editor's report made it seem like the features came from different papers. This is an extension we backported to C89 but it's sufficiently distinct in the tracking page so I've added it explicitly to the backported features documentation.
1 parent f3508aa commit a33e505

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

clang/docs/LanguageExtensions.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1763,6 +1763,7 @@ Hexadecimal floating constants (N308) C
17631763
Compound literals (N716) C99 C89, C++
17641764
``//`` comments (N644) C99 C89
17651765
Mixed declarations and code (N740) C99 C89
1766+
init-statement in for (N740) C99 C89
17661767
Variadic macros (N707) C99 C89
17671768
Empty macro arguments (N570) C99 C89
17681769
Trailing comma in enum declaration C99 C89

clang/www/c_status.html

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,15 +1302,10 @@ <h2 id="c99">C99 implementation status</h2>
13021302
<td class="full" align="center">Yes</td>
13031303
</tr>
13041304
<tr>
1305-
<td>mixed declarations and code</td>
1305+
<td>mixed declarations and code<br \>new block scopes for selection and iteration statements</td>
13061306
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n740.htm">N740</a></td>
13071307
<td class="full" align="center">Yes</td>
13081308
</tr>
1309-
<tr>
1310-
<td>new block scopes for selection and iteration statements</td>
1311-
<td>Unknown</td>
1312-
<td class="full" align="center">Yes</td>
1313-
</tr>
13141309
<tr>
13151310
<td>integer constant type rules</td>
13161311
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n629.htm">N629</a></td>

0 commit comments

Comments
 (0)