Skip to content

Commit 6608f81

Browse files
Taojunshenroxkopbld16TylerMSFTTylerMSFT
authored
1/17/2021 AM Publish (#4050)
* Fix incorrect import example * github fix 3544 * GITHUB FIX FOR #3549 * Add UWP to list of unsupported ASAN features. * Fix misnamed mt.exe options. Acrolinx all. * Attempt fpcvt simplification per John Morgan. * Fix cpp-docs 3546 * Address complaint in cpp-docs 3554 (#3950) * Add section on CMake partial activation * 17.1 Update warnings, fix cpp-docs 3563 (#3954) * 17.1 Update warnings, fix cpp-docs 3563 * fix date * Add `/Zc:externC` compiler option doc, fix 1594 * Tweaks. * Fix links, header syntax issues * Fix issues in XML Docs reference * Make list match apparently intended style * Fix broken link. * Add docs for new check Signed-off-by: Kyle Reed <[email protected]> * fix toc * remove .md from toc title * Revert "Add docs for new linter check" * update runtime spelling * Bulk fix: remove HTML entities from yml headers (MicrosoftDocs#3962) * Style and content fixes in cpp language docs * Changing confusing wording about C++ exceptions * Bulk fix HTML entities in H1 (MicrosoftDocs#3966) * Fix lt-gt entity pairs * Bulk fix of `&lt;`-`&gt;` pairs in H1 headings * Oops, deleted initial `#` * Fix two more H1 issues * update with existing .openpublishing.publish.config.json * C++ tutorial landing page, attempt 2 * Revert redirection of get-started index.yml file * Fix typo * Bulk fix `&lt;`, `&gt;`, and `.period;` entities * operatoroperator * `/hotpatch`: No jump to the first instruction * Update Acrolinx for main branch * Change learn about item type * Add get started TOC * fix over machine translation problems (MicrosoftDocs#3977) * fix over machine translation problems * acrolinx and misses * markdown fixes Co-authored-by: TylerMSFT <[email protected]> * Make the grammar bot happy * Fix things that look like parameters. (#3978) * Fix things that look like parameters. * Acrolinxy * Misc fixes * Other fixes * Fix typos * Acrolinx some more * [17.0] Update links to download Visual Studio (MicrosoftDocs#3981) * Update links to download Visual Studio * Remove VS 2019 reference * Address cpp-docs 3565 * Also cpp-docs 439 * cpp-docs 947 * cpp-docs 1002 * accuratized * cpp-docs 1035 * Twhitney named modules (#3960) * draft * draft * draft * fix links * cleanup * added some more info * add some see also references * cleanup pass * remove text about overloads * tech review * little better wording * a little more word smithing * fix link * acrolinx * readthrough pass * Readthrough to test building the project * acrolinx * rename media file Co-authored-by: TylerMSFT <[email protected]> * cpp-docs 1305 * cpp-docs 1324 * address github issue #3524 and add code escape to prevent over machine translation * missed a couple escapes * couple more code escapes * one more escape * Address cpp-docs 3583: LNK1107 clarity * Tweaks * tweak formatting * Expand on fix for cpp-docs 1035 (#3986) * Expand of fix for cpp-docs 1035 * Mention overloads. * Grammar and formatting fixes * add summary of what will learn in module * [17.1p2] Add docs for comparison/bitwise c++ linter check. (MicrosoftDocs#3964) * Revert "Revert "Add docs for new linter check"" This reverts commit e56971f. * PR feedback Signed-off-by: Kyle Reed <[email protected]> * Update cmake-presets-vs.md * Update cmake-presets-vs.md * Switch http to https and fix broken links * Acrolinx * Style pass for the grammar checker bot * Fix two incorrect conditions in the ARM packed exception handling For the prologue, the distinction between `mov r11, sp` and `add r11, sp, #xx` lies only in whether other registers are pushed before R11 and LR in prologue instruction 2. (The condition `R`==1 and `PF`==0 corresponds to no other registers pushed before `r11`.) The `L` flag doesn't affect it (and the documentation explicit says that when `C` is set, then `L` also must be set, thus `C`==1 and `L`==0 is tautological too). This was correctly described in the textual form, but the conditions in the table included one erronous case. For the epilogue, when `Ret`!=0, the function doesn't return by popping LR directly into PC, but with an explicit branch instruction (10a or 10b). In this case, if `L`==1, the LR register is included in the list of registers popped in instruction 8. If register homing is used (`H`==1), then instruction 9a is used instead of 9b. This case seemed to have been overlooked both in the textual description and in the table. Also, when prologue instruction form 3a is used, clarify that it corresponds to the unwind code FB (narrow nop) only, that unwinding such a prologue doesn't restore `sp` from `r11`. Also fix a typo and clarify that encodings with C=1, L=0 are invalid. * Address cpp-docs 3588 error in link commands (#3996) * Address cpp-docs 3588 error in link commands * Update ms.date * Acrolinx fixes to frontrun cpp-docs 3541 * Post-3541 acrolinx pass * Update how-to-marshal-structures-using-cpp-interop.md Change "=" into "-" * Add _CountOneBits[64] to the ARM64 intrinsic doc * Update .acrolinx-config.edn update to reflect default branch name change * Mark first code block as C++ Syntax highlighting did not work for the `using identifier = type;` block due to missing language information. * Fixed grammatical error in allocator-class.md "Constructing a container with a custom allocator provide control over allocation and freeing of that container's elements." -> "Constructing a container with a custom allocator provides control over allocation and freeing of that container's elements." * Update d-using-the-schedule-clause.md * Correct a word in the remarks of /DIRECTIVES. The section is .drectve instead of .drective. * std::is_standard_layout<Derived> * Make meaning clearer This makes the meaning clearer to me. The ". Or," seems like to strong of a separator for closely related phrases. * Update value-types-modern-cpp.md Commas to make the meaning clearer * add missing usage of CopyChars * update json examples (#4017) * update json examples * acrolinx Co-authored-by: TylerMSFT <[email protected]> * fix github issue #3600 * formatting cleanup and acrolinx * Address cpp-docs issues 3601 3622 3626 * Update deprecating-types-and-members-c-cx.md * PR review edit / relative link syntax * add code escape to prevent overtranslation * fix missed code elements and acrolinx * more cleanup * github fixes for #3635 and #3636 (MicrosoftDocs#4026) * github fixes for #3635 and #3636 * acrolinx and cleanup * nit Co-authored-by: TylerMSFT <[email protected]> * Update windows-store-apps-the-windows-runtime-and-the-c-run-time.md * Broken link fixed (MicrosoftDocs#4025) * Implement intrinics broken link fixes (MicrosoftDocs#4028) * Update deprecating-types-and-members-c-cx.md Add code formatting to links to prevent overlocalization and markdown processing issues. * Update windows-store-apps-the-windows-runtime-and-the-c-run-time.md * Follow-up cpp-docs 3637 for style and Acrolinx * [17.0] Add compiler option `/option:strict` (MicrosoftDocs#4002) * edit pass (#4035) * edit pass * acrolinx * acrolinx * minor edits Co-authored-by: TylerMSFT <[email protected]> * Fix non-blocking issues identified in MicrosoftDocs#4032 * Correct & complete REP* keywords in Prefix table * US1907300 - add md code escapes to code elements * updates after review Co-authored-by: roxk <[email protected]> Co-authored-by: opbld16 <[email protected]> Co-authored-by: TylerMSFT <[email protected]> Co-authored-by: Tyler Whitney <[email protected]> Co-authored-by: Laura Brenner <[email protected]> Co-authored-by: opbld17 <[email protected]> Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: branh <[email protected]> Co-authored-by: John Ellison <[email protected]> Co-authored-by: PRMerger8 <[email protected]> Co-authored-by: PRMerger17 <[email protected]> Co-authored-by: Sam Freed <[email protected]> Co-authored-by: opbld15 <[email protected]> Co-authored-by: Colin Cooper <[email protected]> Co-authored-by: Paula Miller <[email protected]> Co-authored-by: Kyle Reed <[email protected]> Co-authored-by: Hannes Harnisch <[email protected]> Co-authored-by: Anna Huff <[email protected]> Co-authored-by: Ying Hua <[email protected]> Co-authored-by: Alex Guteniev <[email protected]> Co-authored-by: Dennis Rea <[email protected]> Co-authored-by: PRMerger3 <[email protected]> Co-authored-by: PRMerger18 <[email protected]> Co-authored-by: PRMerger Service account 2 <[email protected]> Co-authored-by: Jonathan Sweemer <[email protected]> Co-authored-by: Martin Storsjö <[email protected]> Co-authored-by: Kristine Toliver <[email protected]> Co-authored-by: AndreaLu <[email protected]> Co-authored-by: Matt Gardner <[email protected]> Co-authored-by: Sarah Vilaysom <[email protected]> Co-authored-by: Matthias <[email protected]> Co-authored-by: James Oswald <[email protected]> Co-authored-by: Anton Curmanschii <[email protected]> Co-authored-by: ROOOO <[email protected]> Co-authored-by: luozhiya <[email protected]> Co-authored-by: Zane Hitchcox <[email protected]> Co-authored-by: Chris Ho <[email protected]> Co-authored-by: Haig MacGregor <[email protected]> Co-authored-by: PRMerger5 <[email protected]> Co-authored-by: Jaiganesh Kumaran <[email protected]> Co-authored-by: Jak Koke <[email protected]> Co-authored-by: atikmapari <[email protected]> Co-authored-by: Linda Spiller <[email protected]> Co-authored-by: tjs137 <[email protected]> Co-authored-by: Craig Casey <[email protected]>
1 parent ee04235 commit 6608f81

File tree

3 files changed

+35
-37
lines changed

3 files changed

+35
-37
lines changed

docs/c-runtime-library/crt-library-features.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ Using the statically linked CRT implies that any state information saved by the
6565

6666
Because a DLL built by linking to a static CRT has its own CRT state, it isn't recommended to link statically to the CRT in a DLL unless the consequences of this are specifically desired and understood. For example, if you call [`_set_se_translator`](../c-runtime-library/reference/set-se-translator.md) in an executable that loads the DLL linked to its own static CRT, any hardware exceptions generated by the code in the DLL will not be caught by the translator, but hardware exceptions generated by code in the main executable will be caught.
6767

68-
If you're using the **`/clr`** compiler switch, your code will be linked with a static library, msvcmrt.lib. The static library provides a proxy between your managed code and the native CRT. You cannot use the statically linked CRT ( **`/MT`** or **`/MTd`** options) with **`/clr`**. Use the dynamically-linked libraries (**`/MD`** or **`/MDd`**) instead. The pure managed CRT libraries are deprecated in Visual Studio 2015 and unsupported in Visual Studio 2017.
68+
If you're using the **`/clr`** compiler switch, your code will be linked with a static library, `msvcmrt.lib`. The static library provides a proxy between your managed code and the native CRT. You cannot use the statically linked CRT ( **`/MT`** or **`/MTd`** options) with **`/clr`**. Use the dynamically-linked libraries (**`/MD`** or **`/MDd`**) instead. The pure managed CRT libraries are deprecated in Visual Studio 2015 and unsupported in Visual Studio 2017.
6969

7070
For more information on using the CRT with **`/clr`**, see [Mixed (Native and Managed) Assemblies](../dotnet/mixed-native-and-managed-assemblies.md).
7171

7272
To build a debug version of your application, the [`_DEBUG`](../c-runtime-library/debug.md) flag must be defined and the application must be linked with a debug version of one of these libraries. For more information about using the debug versions of the library files, see [CRT Debugging Techniques](/visualstudio/debugger/crt-debugging-techniques).
7373

74-
This version of the CRT isn't fully conformant with the C99 standard. In versions before Visual Studio 2019 version 16.8, the \<tgmath.h> header isn't supported. In all versions, the `CX_LIMITED_RANGE` and `FP_CONTRACT` pragma macros aren't supported. Certain elements such as the meaning of parameter specifiers in standard IO functions use legacy interpretations by default. You can use **`/Zc`** compiler conformance options and specify linker options to control some aspects of library conformance.
74+
This version of the CRT isn't fully conformant with the C99 standard. In versions before Visual Studio 2019 version 16.8, the `<tgmath.h>` header isn't supported. In all versions, the `CX_LIMITED_RANGE` and `FP_CONTRACT` pragma macros aren't supported. Certain elements such as the meaning of parameter specifiers in standard IO functions use legacy interpretations by default. You can use **`/Zc`** compiler conformance options and specify linker options to control some aspects of library conformance.
7575

7676
## C++ Standard Library `.lib` files
7777

docs/c-runtime-library/reference/calloc.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["calloc"]
1010
helpviewer_keywords: ["memory allocation, arrays", "calloc function"]
11-
ms.assetid: 17bb79a1-98cf-4096-90cb-1f9365cd6829
1211
---
13-
# calloc
12+
# `calloc`
1413

1514
Allocates an array in memory with elements initialized to 0.
1615

@@ -25,43 +24,43 @@ void *calloc(
2524

2625
### Parameters
2726

28-
*number*<br/>
27+
*`number`*\
2928
Number of elements.
3029

31-
*size*<br/>
30+
*`size`*\
3231
Length in bytes of each element.
3332

3433
## Return Value
3534

36-
**calloc** returns a pointer to the allocated space. The storage space pointed to by the return value is guaranteed to be suitably aligned for storage of any type of object. To get a pointer to a type other than **`void`**, use a type cast on the return value.
35+
**`calloc`** returns a pointer to the allocated space. The storage space pointed to by the return value is guaranteed to be suitably aligned for storage of any type of object. To get a pointer to a type other than **`void`**, use a type cast on the return value.
3736

3837
## Remarks
3938

40-
The **calloc** function allocates storage space for an array of *number* elements, each of length *size* bytes. Each element is initialized to 0.
39+
The **`calloc`** function allocates storage space for an array of *`number`* elements, each of length *`size`* bytes. Each element is initialized to 0.
4140

42-
**calloc** sets **errno** to **ENOMEM** if a memory allocation fails or if the amount of memory requested exceeds **_HEAP_MAXREQ**. For information on this and other error codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md).
41+
**`calloc`** sets **`errno`** to **`ENOMEM`** if a memory allocation fails or if the amount of memory requested exceeds **`_HEAP_MAXREQ`**. For information on this and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md).
4342

44-
In the Microsoft implementation, if *number* or *size* is zero, **calloc** returns a pointer to an allocated block of non-zero size. An attempt to read or write through the returned pointer leads to undefined behavior.
43+
In the Microsoft implementation, if *`number`* or *`size`* is zero, **`calloc`** returns a pointer to an allocated block of non-zero size. An attempt to read or write through the returned pointer leads to undefined behavior.
4544

46-
**calloc** uses the C++ [_set_new_mode](set-new-mode.md) function to set the *new handler mode*. The new handler mode indicates whether, on failure, **calloc** is to call the new handler routine as set by [_set_new_handler](set-new-handler.md). By default, **calloc** doesn't call the new handler routine on failure to allocate memory. You can override this default behavior so that, when **calloc** fails to allocate memory, it calls the new handler routine in the same way that the **`new`** operator does when it fails for the same reason. To override the default, call
45+
**`calloc`** uses the C++ [`_set_new_mode`](set-new-mode.md) function to set the *new handler mode*. The new handler mode indicates whether, on failure, **`calloc`** is to call the new handler routine as set by [`_set_new_handler`](set-new-handler.md). By default, **`calloc`** doesn't call the new handler routine on failure to allocate memory. You can override this default behavior so that, when **`calloc`** fails to allocate memory, it calls the new handler routine in the same way that the **`new`** operator does when it fails for the same reason. To override the default, call
4746

4847
```C
4948
_set_new_mode(1);
5049
```
5150
52-
early in your program, or link with *NEWMODE.OBJ* (see [Link Options](../../c-runtime-library/link-options.md)).
51+
early in your program, or link with *`NEWMODE.OBJ`* (see [Link Options](../../c-runtime-library/link-options.md)).
5352
54-
When the application is linked with a debug version of the C run-time libraries, **calloc** resolves to [_calloc_dbg](calloc-dbg.md). For more information about how the heap is managed during the debugging process, see [The CRT Debug Heap](/visualstudio/debugger/crt-debug-heap-details).
53+
When the application is linked with a debug version of the C run-time libraries, **`calloc`** resolves to [`_calloc_dbg`](calloc-dbg.md). For more information about how the heap is managed during the debugging process, see [The CRT Debug Heap](/visualstudio/debugger/crt-debug-heap-details).
5554
56-
**calloc** is marked `__declspec(noalias)` and `__declspec(restrict)`, meaning that the function is guaranteed not to modify global variables, and that the pointer returned isn't aliased. For more information, see [noalias](../../cpp/noalias.md) and [restrict](../../cpp/restrict.md).
55+
**`calloc`** is marked `__declspec(noalias)` and `__declspec(restrict)`, meaning that the function is guaranteed not to modify global variables, and that the pointer returned isn't aliased. For more information, see [`noalias`](../../cpp/noalias.md) and [`restrict`](../../cpp/restrict.md).
5756
5857
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
5958
6059
## Requirements
6160
6261
|Routine|Required header|
6362
|-------------|---------------------|
64-
|**calloc**|\<stdlib.h> and \<malloc.h>|
63+
|**`calloc`**|`<stdlib.h>` and `<malloc.h>`|
6564
6665
For additional compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
6766
@@ -94,7 +93,7 @@ Allocated 40 long integers
9493

9594
## See also
9695

97-
[Memory Allocation](../../c-runtime-library/memory-allocation.md)<br/>
98-
[free](free.md)<br/>
99-
[malloc](malloc.md)<br/>
100-
[realloc](realloc.md)<br/>
96+
[Memory Allocation](../../c-runtime-library/memory-allocation.md)\
97+
[`free`](free.md)\
98+
[`malloc`](malloc.md)\
99+
[`realloc`](realloc.md)\

docs/c-runtime-library/reference/log-logf-log10-log10f.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["logf", "logl", "_log10l", "log", "_logl", "log10f", "log10l", "log10"]
1010
helpviewer_keywords: ["calculating logarithms", "log10f function", "log10 function", "log function", "log10l function", "logl function", "logf function", "logarithms"]
11-
ms.assetid: 7adc77c2-04f7-4245-a980-21215563cfae
1211
---
13-
# log, logf, logl, log10, log10f, log10l
12+
# `log`, `logf`, `logl`, `log10`, `log10f`, `log10l`
1413

1514
Calculates logarithms.
1615

@@ -34,35 +33,35 @@ long double log10(long double x); // C++ only
3433
3534
### Parameters
3635
37-
*x*\
36+
*`x`*\
3837
Value whose logarithm is to be found.
3938
4039
## Return Value
4140
42-
The **log** functions return the natural logarithm (base *e*) of *x* if successful. The **log10** functions return the base-10 logarithm. If *x* is negative, these functions return an indefinite (IND), by default. If *x* is 0, they return infinity (INF).
41+
The **`log`** functions return the natural logarithm (base *`e`*) of *`x`* if successful. The **`log10`** functions return the base-10 logarithm. If *`x`* is negative, these functions return an indefinite (`IND`), by default. If *`x`* is 0, they return infinity (`INF`).
4342
4443
|Input|SEH Exception|Matherr Exception|
4544
|-----------|-------------------|-----------------------|
46-
|± QNAN, IND|none|_DOMAIN|
47-
|± 0|ZERODIVIDE|_SING|
48-
|*x* < 0|INVALID|_DOMAIN|
45+
`QNAN`, `IND`|none|`_DOMAIN`|
46+
|± 0|`ZERODIVIDE`|`_SING`|
47+
|*`x < 0`*|`INVALID`|`_DOMAIN`|
4948
50-
**log** and **log10** have an implementation that uses Streaming SIMD Extensions 2 (SSE2). See [_set_SSE2_enable](set-sse2-enable.md) for information and restrictions on using the SSE2 implementation.
49+
**`log`** and **`log10`** have an implementation that uses Streaming SIMD Extensions 2 (SSE2). See [`_set_SSE2_enable`](set-sse2-enable.md) for information and restrictions on using the SSE2 implementation.
5150
5251
## Remarks
5352
54-
C++ allows overloading, so you can call overloads of **log** and **log10** that take and return **`float`** or **`long double`** values. In a C program, unless you're using the \<tgmath.h> macro to call this function, **log** and **log10** always take and return a **`double`**.
53+
C++ allows overloading, so you can call overloads of **`log`** and **`log10`** that take and return **`float`** or **`long double`** values. In a C program, unless you're using the `<tgmath.h>` macro to call this function, **`log`** and **`log10`** always take and return a **`double`**.
5554
56-
If you use the \<tgmath.h> `log()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details.
55+
If you use the `<tgmath.h> log()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details.
5756
5857
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
5958
6059
## Requirements
6160
6261
|Routine|Required header|
6362
|-------------|---------------------|
64-
|**log**, **logf**, **logl**, **log10**, **log10f**, **log10l**|\<math.h>|
65-
|**log** macro | \<tgmath.h> |
63+
|**`log`**, **`logf`**, **`logl`**, **`log10`**, **`log10f`**, **`log10l`**|`<math.h>`|
64+
|**`log`** macro | `<tgmath.h>` |
6665
6766
For additional compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
6867
@@ -123,9 +122,9 @@ Log base 2 of 65536.000000 is 16.000000
123122

124123
## See also
125124

126-
[Floating-Point Support](../../c-runtime-library/floating-point-support.md) <br/>
127-
[exp, expf, expl](exp-expf.md) <br/>
128-
[_matherr](matherr.md) <br/>
129-
[pow, powf, powl](pow-powf-powl.md) <br/>
130-
[_CIlog](../../c-runtime-library/cilog.md) <br/>
131-
[_CIlog10](../../c-runtime-library/cilog10.md)<br/>
125+
[Floating-Point Support](../../c-runtime-library/floating-point-support.md) \
126+
[`exp`, `expf`, `expl`](exp-expf.md) \
127+
[`_matherr`](matherr.md) \
128+
[`pow`, `powf`, `powl`](pow-powf-powl.md) \
129+
[`_CIlog`](../../c-runtime-library/cilog.md) \
130+
[`_CIlog10`](../../c-runtime-library/cilog10.md)\

0 commit comments

Comments
 (0)