summaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-09-20 21:23:12 +0100
committerBram Moolenaar <Bram@vim.org>2022-09-20 21:23:12 +0100
commit4cbdcbda2d0abef3d7443320d7716f0e63e2df68 (patch)
tree2087564ae06da6c412acae1fb1218546321f8c5d /runtime/doc
parent2d2e25b3e3c932e76f53e9cc49b60e92a7dc8715 (diff)
downloadvim-git-4cbdcbda2d0abef3d7443320d7716f0e63e2df68.tar.gz
patch 9.0.0524: build instructions for MS-Windows are outdatedv9.0.0524
Problem: Build instructions for MS-Windows are outdated. Solution: Remove instructions for old MSVC versions.
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/develop.txt17
1 files changed, 13 insertions, 4 deletions
diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt
index 4739a102a..f76a9456e 100644
--- a/runtime/doc/develop.txt
+++ b/runtime/doc/develop.txt
@@ -188,8 +188,8 @@ C COMPILER *style-compiler* *ANSI-C* *C89* *C99*
The minimal C compiler version supported is C89, also known as ANSI C.
Later standards, such as C99, are not widely supported, or at least not 100%
-supported. Therefore we use only some of the C99 features and disallow some
-(at least for now).
+supported. Therefore we use only some of the C99 features and explicitly
+disallow some (this will gradually be adjusted over time).
Please don't make changes everywhere to use the C99 features, it causes merge
problems for existing patches. Only use them for new and changed code.
@@ -215,12 +215,21 @@ Types ~
"long long" is allowed and can be expected to be 64 bits. Use %lld in printf
formats. Also "long long unsigned" with %llu.
+Declarations ~
+
+Now that the minimal supported compiler is MSVC 2015 declarations do not need
+to be at the start of a block. However, it is often a good idea to do this
+anyway.
+
+Declaration of the for loop variable inside the loop is recommended:
+ for (int i = 0; i < len; ++i)
+Since this is clearly an advantage we'll use this more often.
+
+
Not to be used ~
These C99 features are not to be used, because not enough compilers support
them:
-- Declaration after Statements (MSVC 2012 does not support it). All
- declarations need to be at the start of the block.
- Variable length arrays (even in C11 this is an optional feature).
- _Bool and _Complex types.
- "inline" (it's hardly ever needed, let the optimizer do its work)