https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/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. >From b20a3bea1cd424c4a62d35e41ccdecc80e5925f7 Mon Sep 17 00:00:00 2001 From: Aaron Ballman <aa...@aaronballman.com> Date: Thu, 21 Aug 2025 08:14:23 -0400 Subject: [PATCH] [C99] Update documentation for scope of variables in loops; NFC 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. --- clang/docs/LanguageExtensions.rst | 1 + clang/www/c_status.html | 7 +------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/clang/docs/LanguageExtensions.rst b/clang/docs/LanguageExtensions.rst index 1b749ead355c7..3c6c97bb1fa10 100644 --- a/clang/docs/LanguageExtensions.rst +++ b/clang/docs/LanguageExtensions.rst @@ -1763,6 +1763,7 @@ Hexadecimal floating constants (N308) C Compound literals (N716) C99 C89, C++ ``//`` comments (N644) C99 C89 Mixed declarations and code (N740) C99 C89 +init-statement in for (N740) C99 C89 Variadic macros (N707) C99 C89 Empty macro arguments (N570) C99 C89 Trailing comma in enum declaration C99 C89 diff --git a/clang/www/c_status.html b/clang/www/c_status.html index dcff2fc2b1a3e..5b31f97e7a2e5 100644 --- a/clang/www/c_status.html +++ b/clang/www/c_status.html @@ -1302,15 +1302,10 @@ <h2 id="c99">C99 implementation status</h2> <td class="full" align="center">Yes</td> </tr> <tr> - <td>mixed declarations and code</td> + <td>mixed declarations and code<br \>new block scopes for selection and iteration statements</td> <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n740.htm">N740</a></td> <td class="full" align="center">Yes</td> </tr> - <tr> - <td>new block scopes for selection and iteration statements</td> - <td>Unknown</td> - <td class="full" align="center">Yes</td> - </tr> <tr> <td>integer constant type rules</td> <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n629.htm">N629</a></td> _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits