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
2
2
3
3
4
4
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -188,8 +188,8 @@ C COMPILER *style-compiler* *ANSI-C* *C89* *C99*
188
188
189
189
The minimal C compiler version supported is C89, also known as ANSI C.
190
190
Later 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 ).
193
193
194
194
Please don't make changes everywhere to use the C99 features, it causes merge
195
195
problems for existing patches. Only use them for new and changed code.
@@ -215,12 +215,21 @@ Types ~
215
215
"long long" is allowed and can be expected to be 64 bits. Use %lld in printf
216
216
formats. Also "long long unsigned" with %llu.
217
217
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
+
218
229
Not to be used ~
219
230
220
231
These C99 features are not to be used, because not enough compilers support
221
232
them:
222
- - Declaration after Statements (MSVC 2012 does not support it). All
223
- declarations need to be at the start of the block.
224
233
- Variable length arrays (even in C11 this is an optional feature).
225
234
- _Bool and _Complex types.
226
235
- "inline" (it's hardly ever needed, let the optimizer do its work)
0 commit comments