Skip to content

Commit 7245d8f

Browse files
Tyler WhitneyTyler Whitney
authored andcommitted
c11/17 updates
1 parent daec78e commit 7245d8f

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ You can use NMAKE and makefiles, or MSBuild and project files to configure and b
171171
172172
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 partial 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 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).
175175
176176
## See also
177177

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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, C11 `fopen()` exclusive mode, 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__ 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.
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 [/experimental:preprocessor](../build/reference/experimental-preprocessor.md) compiler option enables a new implementation of the preprocessor. The new implementation is still in progress, and is therefore considered experimental. It is intended to eventually be conformant with C99, C11, and C++20. For more information, see [MSVC new preprocessor overview](preprocessor-experimental-overview.md).
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`.
1313

1414
## In this section
1515

0 commit comments

Comments
 (0)