You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4da167c
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/build/walkthrough-compile-a-c-program-on-the-command-line.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -169,9 +169,9 @@ The compiler, cl.exe, has many more options you can apply to build, optimize, de
169
169
170
170
You can use NMAKE and makefiles, or MSBuild and project files to configure and build more complex projects on the command line. For more information on using these tools, see [NMAKE Reference](reference/nmake-reference.md) and [MSBuild](msbuild-visual-cpp.md).
171
171
172
-
The C and C++ languages are similar, but not the same. The Microsoft C/C++ compiler (MSVC) uses a simple rule to determine which language to use when it compiles your code. By default, the MSVC compiler treats all files that end in .c as C source code, and all files that end in .cpp as C++ source code. To force the compiler to treat all files as C non-dependent of file name extension, use the [/Tc](reference/tc-tp-tc-tp-specify-source-file-type.md) compiler option.
172
+
The C and C++ languages are similar, but not the same. The Microsoft C/C++ compiler (MSVC) uses a simple rule to determine which language to use when it compiles your code. By default, the MSVC compiler treats all files that end in .c as C source code, and all files that end in .cpp as C++ source code. To force the compiler to treat all files as C non-dependent of file name extension, use the [/TC](reference/tc-tp-tc-tp-specify-source-file-type.md) compiler option.
173
173
174
-
MSVC is compatible with the ISO C99 standard, but not strictly compliant. In most cases, portable C code will compile and run as expected. Visual C++ provides some support for the changes in ISO C11. To compile with C11/17 support, use the compiler flag `/std:c11` or `/std:c17`. Certain library functions and POSIX function names are deprecated by MSVC. The functions are supported, but the preferred names have changed. For more information, see [Security Features in the CRT](../c-runtime-library/security-features-in-the-crt.md) and [Compiler Warning (level 3) C4996](../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md).
174
+
MSVC is compatible with the ISO C99 standard, but not strictly compliant. In most cases, portable C code will compile and run as expected. Visual C++ provides support for the changes in ISO C11/C17. To compile with C11/17 support, use the compiler flag `/std:c11` or `/std:c17`. Certain library functions and POSIX function names are deprecated by MSVC. The functions are supported, but the preferred names have changed. For more information, see [Security Features in the CRT](../c-runtime-library/security-features-in-the-crt.md) and [Compiler Warning (level 3) C4996](../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md).
Copy file name to clipboardExpand all lines: docs/c-runtime-library/compatibility.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
---
2
2
title: "Compatibility"
3
-
description: "Describes the compatibility of the Microsoft Universal C runtime library (UCRT) with the Standard C library, POSIX, the Safe CRT, and Store apps."
3
+
description: "Describes the compatibility of the Microsoft Universal C run-time library (UCRT) with the Standard C library, POSIX, the Safe CRT, and Store apps."
4
4
ms.date: "12/06/2019"
5
5
helpviewer_keywords: ["CRT, compatibility", "compatibility, C run-time libraries", "compatibility"]
6
6
ms.assetid: 346709cb-edda-4909-9a19-3d253eddb6b7
7
7
---
8
8
# Compatibility
9
9
10
-
The Universal C Run-Time Library (UCRT) supports most of the C standard library required for C++ conformance. It implements the C99 (ISO/IEC 9899:1999) library, with certain exceptions: strict type compatibility in \<complex.h>. The UCRT also implements a large subset of the POSIX.1 (ISO/IEC 9945-1:1996, the POSIX System Application Program Interface) C library. However, it's not fully conformant to any specific POSIX standard. The UCRT also implements several Microsoft-specific functions and macros that aren't part of a standard.
10
+
The Universal C Runtime Library (UCRT) supports most of the C standard library required for C++ conformance. It implements the C99 (ISO/IEC 9899:1999) library, with certain exceptions: strict type compatibility in \<complex.h>. The UCRT also implements a large subset of the POSIX.1 (ISO/IEC 9945-1:1996, the POSIX System Application Program Interface) C library. However, it's not fully conformant to any specific POSIX standard. The UCRT also implements several Microsoft-specific functions and macros that aren't part of a standard.
11
11
12
12
Functions specific to the Microsoft implementation of Visual C++ are found in the vcruntime library. Many of these functions are for internal use and can't be called by user code. Some are documented for use in debugging and implementation compatibility.
13
13
@@ -21,7 +21,7 @@ Except as noted within the documentation for specific functions, the UCRT is com
21
21
22
22
|Title|Description|
23
23
|-----------|-----------------|
24
-
|[UWP Apps, the Windows Runtime, and the C Run-Time](../c-runtime-library/windows-store-apps-the-windows-runtime-and-the-c-run-time.md)|Describes when UCRT routines aren't compatible with Universal Windows apps or Microsoft Store apps.|
24
+
|[UWP Apps, the Windows Runtime, and the C runtime](../c-runtime-library/windows-store-apps-the-windows-runtime-and-the-c-run-time.md)|Describes when UCRT routines aren't compatible with Universal Windows apps or Microsoft Store apps.|
25
25
|[ANSI C Compliance](../c-runtime-library/ansi-c-compliance.md)|Describes standard-compliant naming in the UCRT.|
26
26
|[UNIX](../c-runtime-library/unix.md)|Provides guidelines for porting programs to UNIX.|
27
27
|[Windows Platforms (CRT)](../c-runtime-library/windows-platforms-crt.md)|Lists the operating systems that are the CRT supports.|
Copy file name to clipboardExpand all lines: docs/overview/visual-cpp-language-conformance.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -426,7 +426,7 @@ The compiler option [`/Zc:noexceptTypes`](../build/reference/zc-noexcepttypes.md
426
426
427
427
<aname="note_B"></a> __B__ Supported in [`/permissive-`](../build/reference/permissive-standards-conformance.md) mode in Visual Studio 2017 version 15.7. For more information, see [Two-phase name lookup support comes to MSVC](https://devblogs.microsoft.com/cppblog/two-phase-name-lookup-support-comes-to-msvc/).
428
428
429
-
<aname="note_C"></a> __C__ Starting in Visual Studio 2017 version 15.8, the compiler provides support for the C99 preprocessor via the [/experimental:preprocessor](../build/reference/experimental-preprocessor.md) compiler switch. Starting in Visual Studio 2019 version 16.6, the compiler fully implements the C99 preprocessor via the [`/Zc:preprocessor`](../build/reference/zc-conformance.md) switch. It is on by default when the compiler switch `std:/c11` or `std:/c17` is specified.
429
+
<aname="note_C"></a> __C__ Starting in Visual Studio 2017 version 15.8, the compiler provides support for the C99 preprocessor via the [/experimental:preprocessor](../build/reference/experimental-preprocessor.md) compiler switch. Starting in Visual Studio 2019 version 16.6, the compiler fully implements the C99 preprocessor via the [`/Zc:preprocessor`](../build/reference/zc-conformance.md) switch. It is on by default when the compiler switch `/std:c11` or `/std:c17` is specified.
430
430
431
431
<aname="note_D"></a> __D__ Supported under [`/std:c++14`](../build/reference/std-specify-language-standard-version.md) with a suppressible warning, [`C4984`](../error-messages/compiler-warnings/compiler-warning-c4984.md).
432
432
@@ -445,7 +445,7 @@ previous `std::experimental` version, made necessary by symlink support, bug fix
445
445
446
446
<aname="note_byte"></a> __byte__`std::byte` is enabled by [`/std:c++17`](../build/reference/std-specify-language-standard-version.md) (or [`/std:c++latest`](../build/reference/std-specify-language-standard-version.md)), but because it can conflict with the Windows SDK headers in some cases, it has a fine-grained opt-out macro. It can be disabled by defining `_HAS_STD_BYTE` as `0`.
447
447
448
-
<aname="note_C11"></a> __C11__ The Universal CRT implemented the parts of the C11 Standard Library that are required by C++17, with the exception of C99 `strftime()` E/O alternative conversion specifiers, and C11 `aligned_alloc()`. The latter is unlikely to be implemented, because C11 specified `aligned_alloc()` in a way that's incompatible with the Microsoft implementation of `free()`: namely, that `free()` must be able to handle highly aligned allocations.
448
+
<aname="note_C11"></a> __C11__Compiler support for C11 requires Visual Studio version 16.8, or higher. C11 library support requires Windows SDK version 20211, or higher. The Universal CRT implements the parts of the C11 Standard Library that are required by C++17, with the exception of C99 `strftime()` E/O alternative conversion specifiers, and C11 `aligned_alloc()`. The latter is unlikely to be implemented because the Windows operating system doesn't support aligned allocations.
449
449
450
450
<aname="note_rem"></a> __rem__ Features removed when the [`/std:c++17`](../build/reference/std-specify-language-standard-version.md) (or [`/std:c++latest`](../build/reference/std-specify-language-standard-version.md)) compiler option is specified. These features can be re-enabled to ease the transition to newer language modes by use of these macros: `_HAS_AUTO_PTR_ETC`, `_HAS_FUNCTION_ALLOCATOR_SUPPORT`, `_HAS_OLD_IOSTREAMS_MEMBERS`, and `_HAS_UNEXPECTED`.
The *C/C++ preprocessor reference* explains the preprocessor as it is implemented in Microsoft C/C++. The preprocessor performs preliminary operations on C and C++ files before they are passed to the compiler. You can use the preprocessor to conditionally compile code, insert files, specify compile-time error messages, and apply machine-specific rules to sections of code.
11
11
12
-
In Visual Studio 2019 the [/Zc:preprocessor](../build/reference/zc-preprocessor.md) compiler option provides a fully conformant with C11 and C17. This is the default when you use the compiler flag `/std:c11` or `/std:c17`.
12
+
In Visual Studio 2019 the [/Zc:preprocessor](../build/reference/zc-preprocessor.md) compiler option provides a fully conformant C11 and C17 preprocessor. This is the default when you use the compiler flag `/std:c11` or `/std:c17`.
0 commit comments