Skip to content

Commit 11f85b3

Browse files
authored
Merge pull request #1151 from tsuyoshicho/update/20221009/develop
Update develop.{txt,jax}
2 parents 81f6a0d + d7f734d commit 11f85b3

File tree

2 files changed

+28
-10
lines changed

2 files changed

+28
-10
lines changed

doc/develop.jax

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*develop.txt* For Vim バージョン 9.0. Last change: 2020 Aug 15
1+
*develop.txt* For Vim バージョン 9.0. Last change: 2022 Sep 20
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -190,8 +190,8 @@ C COMPILER *style-compiler* *ANSI-C* *C89* *C99*
190190

191191
サポートされている最小の C コンパイラのバージョンは C89 (ANSI C とも呼ばれてい
192192
る) である。C99 のような後継の標準規格はあまり普及していない、もしくは少なくと
193-
も 100% サポートされているわけではない。したがって C99 のいくつかの機能だけを
194-
使用し、その他の使用は (少なくとも現時点では) 禁止する
193+
も 100% サポートされているわけではない。したがってC99 機能の一部のみを使用
194+
し、一部を明示的に禁止する (これは時間の経過とともに徐々に調整される)
195195

196196
現存するパッチに対してマージの問題を引き起こすため、C99の機能を使う変更を至る
197197
所に入れてはいけない。新しくコードを書く場合、もしくは既存のコードを書き直す場
@@ -219,11 +219,20 @@ C COMPILER *style-compiler* *ANSI-C* *C89* *C99*
219219
"long long" は使用してもよく、64 bit を想定している。printf では %lld を使用す
220220
ること。同じように "long long unsigned" では %llu を使用する。
221221

222+
宣言 ~
223+
224+
現在、サポートされている最小限のコンパイラは MSVC 2015 であり、宣言はブロック
225+
の先頭にある必要はない。しかし、多くの場合、とにかくこれを実施することを推奨す
226+
る。
227+
228+
for ループ変数のループ内宣言を推奨する:
229+
for (int i = 0; i < len; ++i)
230+
これは明確な利点なので、より頻繁に使用することになる。
231+
232+
222233
使用してはいけないもの ~
223234

224235
これらの C99 の機能は、コンパイラのサポートが不十分なため使用してはいけない。
225-
- ステートメントの後の宣言 (MSVC 2012 はこれをサポートしていない)。すべての宣
226-
言はブロックの先頭になければならない。
227236
- 可変長配列 (C11 でもこれはオプショナルな機能である)。
228237
- _Bool 型と _Complex 型。
229238
- "inline" (ほとんど必要ない、コンパイラに最適化させよう。)

en/develop.txt

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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

189189
The minimal C compiler version supported is C89, also known as ANSI C.
190190
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).
193193

194194
Please don't make changes everywhere to use the C99 features, it causes merge
195195
problems 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
216216
formats. 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+
218229
Not to be used ~
219230

220231
These C99 features are not to be used, because not enough compilers support
221232
them:
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

Comments
 (0)