Skip to content

Commit 4da167c

Browse files
Tyler WhitneyTyler Whitney
authored andcommitted
incorp feedback
1 parent 7245d8f commit 4da167c

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎docs/build/walkthrough-compile-a-c-program-on-the-command-line.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ The compiler, cl.exe, has many more options you can apply to build, optimize, de
169169
170170
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).
171171
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.
173173
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).
175175
176176
## See also
177177

‎docs/c-runtime-library/compatibility.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
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."
44
ms.date: "12/06/2019"
55
helpviewer_keywords: ["CRT, compatibility", "compatibility, C run-time libraries", "compatibility"]
66
ms.assetid: 346709cb-edda-4909-9a19-3d253eddb6b7
77
---
88
# Compatibility
99

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.
1111

1212
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.
1313

@@ -21,7 +21,7 @@ Except as noted within the documentation for specific functions, the UCRT is com
2121

2222
|Title|Description|
2323
|-----------|-----------------|
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.|
2525
|[ANSI C Compliance](../c-runtime-library/ansi-c-compliance.md)|Describes standard-compliant naming in the UCRT.|
2626
|[UNIX](../c-runtime-library/unix.md)|Provides guidelines for porting programs to UNIX.|
2727
|[Windows Platforms (CRT)](../c-runtime-library/windows-platforms-crt.md)|Lists the operating systems that are the CRT supports.|

‎docs/overview/visual-cpp-language-conformance.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ The compiler option [`/Zc:noexceptTypes`](../build/reference/zc-noexcepttypes.md
426426

427427
<a name="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/).
428428

429-
<a name="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+
<a name="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.
430430

431431
<a name="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).
432432

@@ -445,7 +445,7 @@ previous `std::experimental` version, made necessary by symlink support, bug fix
445445

446446
<a name="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`.
447447

448-
<a name="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+
<a name="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.
449449

450450
<a name="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`.
451451

‎docs/preprocessor/c-cpp-preprocessor-reference.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.assetid: e4a52843-7016-4f6d-8b40-cb1ace18f805
99

1010
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.
1111

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`.
1313

1414
## In this section
1515

0 commit comments

Comments
 (0)