1- *develop.txt* For Vim version 9.0. Last change: 2020 Aug 15
1+ *develop.txt* For Vim version 9.0. Last change: 2022 Sep 20
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -188,8 +188,8 @@ C COMPILER *style-compiler* *ANSI-C* *C89* *C99*
188188
189189The minimal C compiler version supported is C89, also known as ANSI C.
190190Later standards, such as C99, are not widely supported, or at least not 100%
191- supported. Therefore we use only some of the C99 features and disallow some
192- (at least for now ).
191+ supported. Therefore we use only some of the C99 features and explicitly
192+ disallow some (this will gradually be adjusted over time ).
193193
194194Please don't make changes everywhere to use the C99 features, it causes merge
195195problems for existing patches. Only use them for new and changed code.
@@ -215,12 +215,21 @@ Types ~
215215"long long" is allowed and can be expected to be 64 bits. Use %lld in printf
216216formats. Also "long long unsigned" with %llu.
217217
218+ Declarations ~
219+
220+ Now that the minimal supported compiler is MSVC 2015 declarations do not need
221+ to be at the start of a block. However, it is often a good idea to do this
222+ anyway.
223+
224+ Declaration of the for loop variable inside the loop is recommended:
225+ for (int i = 0; i < len; ++i)
226+ Since this is clearly an advantage we'll use this more often.
227+
228+
218229Not to be used ~
219230
220231These C99 features are not to be used, because not enough compilers support
221232them:
222- - Declaration after Statements (MSVC 2012 does not support it). All
223- declarations need to be at the start of the block.
224233- Variable length arrays (even in C11 this is an optional feature).
225234- _Bool and _Complex types.
226235- "inline" (it's hardly ever needed, let the optimizer do its work)
0 commit comments