Skip to content

Commit 3e0d71c

Browse files
authored
[clang-cl] document correct defaults for -fms-compatibility-version / -fmsc-version (#76418)
The UserManual states wrongly (AFAICT) that these default are not being defined for clang-cl, whereas further up the opposite is stated: https://github.com/llvm/llvm-project/blob/c86fe3ee0b92934f5d18394d9a0cdc1d3f0eef64/clang/docs/UsersManual.rst#L3375-L3382 I've chosen to follow that wording, as it's the latest related update. CC @RIscRIpt who recently touched this in b3e6ff3 CC @AaronBallman who cared about this, c.f. 8fc0dcf
1 parent 0a64367 commit 3e0d71c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clang/docs/CommandGuide/clang.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ Language Selection and Mode Options
302302
.. option:: -fmsc-version=
303303

304304
Set ``_MSC_VER``. When on Windows, this defaults to either the same value as
305-
the currently installed version of cl.exe, or ``1920``. Not set otherwise.
305+
the currently installed version of cl.exe, or ``1933``. Not set otherwise.
306306

307307
.. option:: -fborland-extensions
308308

clang/docs/UsersManual.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4436,11 +4436,11 @@ Execute ``clang-cl /?`` to see a list of supported options:
44364436
-fmerge-all-constants Allow merging of constants
44374437
-fms-compatibility-version=<value>
44384438
Dot-separated value representing the Microsoft compiler version
4439-
number to report in _MSC_VER (0 = don't define it (default))
4439+
number to report in _MSC_VER (0 = don't define it; default is same value as installed cl.exe, or 1933)
44404440
-fms-compatibility Enable full Microsoft Visual C++ compatibility
44414441
-fms-extensions Accept some non-standard constructs supported by the Microsoft compiler
44424442
-fmsc-version=<value> Microsoft compiler version number to report in _MSC_VER
4443-
(0 = don't define it (default))
4443+
(0 = don't define it; default is same value as installed cl.exe, or 1933)
44444444
-fno-addrsig Don't emit an address-significance table
44454445
-fno-builtin-<value> Disable implicit builtin knowledge of a specific function
44464446
-fno-builtin Disable implicit builtin knowledge of functions

0 commit comments

Comments
 (0)