Author: Aaron Ballman
Date: 2025-08-21T12:46:57Z
New Revision: a33e505c1a852524dc065a7b4cb07ca6dccd6bf0

URL: 
https://github.com/llvm/llvm-project/commit/a33e505c1a852524dc065a7b4cb07ca6dccd6bf0
DIFF: 
https://github.com/llvm/llvm-project/commit/a33e505c1a852524dc065a7b4cb07ca6dccd6bf0.diff

LOG: [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.

Added: 
    

Modified: 
    clang/docs/LanguageExtensions.rst
    clang/www/c_status.html

Removed: 
    


################################################################################
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

Reply via email to