Skip to content

Commit a26a66a

Browse files
authored
Merge pull request MicrosoftDocs#3373 from MicrosoftDocs/master
1/22/2021 AM Publish
2 parents 3d9cfde + bd51f99 commit a26a66a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+692
-692
lines changed

docs/build/reference/i-additional-include-directories.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,51 +6,53 @@ f1_keywords: ["VC.Project.VCCLWCECompilerTool.AdditionalIncludeDirectories", "VC
66
helpviewer_keywords: ["/I compiler option [C++]", "Additional Include Directories compiler option", "I compiler option [C++]", "-I compiler option [C++]", "set include directories", "include directories, compiler option [C++]"]
77
ms.assetid: 3e9add2a-5ed8-4d15-ad79-5b411e313a49
88
---
9-
# /I (Additional include directories)
9+
# `/I` (Additional include directories)
1010

1111
Adds a directory to the list of directories searched for include files.
1212

1313
## Syntax
1414

15-
> **/I**[ ]*directory*
15+
> **`/I`** *directory*
1616
1717
### Arguments
1818

19-
*directory*<br/>
20-
The directory to be added to the list of directories searched for include files.
19+
*directory*\
20+
The directory to add to the list of directories searched for include files. The space between `/I` and *directory* is optional. Directories that include spaces must be enclosed in double quotes. A directory may be an absolute path or a relative path.
2121

2222
## Remarks
2323

2424
To add more than one directory, use this option more than once. Directories are searched only until the specified include file is found.
2525

26-
You can use this option with the ([/X (Ignore Standard Include Paths)](x-ignore-standard-include-paths.md)) option.
26+
You can use this option on the same command line as the ([`/X` (Ignore standard include paths)](x-ignore-standard-include-paths.md)) option.
27+
28+
A [`#include` directive](../../preprocessor/hash-include-directive-c-cpp.md) can be specified in double-quote (or local-first) form, for example, `#include "local.h"`. Or, it can be specified in angle-bracket (or include-path-first) form, for example, `#include <iostream>`.
2729

2830
The compiler searches directories in the following order:
2931

30-
1. If specified using a [#include directive](../../preprocessor/hash-include-directive-c-cpp.md) in double-quote form, it first searches local directories. The search begins in the same directory as the file that contains the **#include** statement. If this fails to find the file, it searches in the directories of the currently opened include files, in the reverse order in which they were opened. The search begins in the directory of the parent include file and continues upward through the directories of any grandparent include files.
32+
1. If the **`#include`** directive is specified using double-quote form, it first searches local directories. The search begins in the same directory as the file that contains the **`#include`** directive. If it fails to find the file, it searches next in the directories of the currently opened include files, in the reverse order in which they were opened. The search begins in the directory of the parent include file and continues upward through the directories of any grandparent include files.
3133

32-
1. If specified using a **#include** directive in angle bracket form, or if the local directory search has failed, it searches directories specified by using the **/I** option, in the order that CL encounters them on the command line.
34+
1. If the **`#include`** directive is specified in angle-bracket form, or if the local directory search has failed, it searches directories specified by using the **`/I`** option, in the order they're specified on the command line.
3335

34-
1. Directories specified in the **INCLUDE** environment variable.
36+
1. Directories specified in the **`INCLUDE`** environment variable.
3537

3638
### To set this compiler option in the Visual Studio development environment
3739

3840
1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
3941

4042
1. Select the **Configuration Properties** > **C/C++** > **General** property page.
4143

42-
1. Modify the **Additional Include Directories** property.
44+
1. Modify the **Additional Include Directories** property. You can specify more than one directory at a time in this property. Directories must be separated by a semicolon (**`;`**).
4345

4446
### To set this compiler option programmatically
4547

4648
- See <xref:Microsoft.VisualStudio.VCProjectEngine.VCCLCompilerTool.AdditionalIncludeDirectories%2A>.
4749

4850
## Example
4951

50-
The following command looks for the include files requested by MAIN.c in the following order: First, if specified by using double-quotes, local files are searched. Next, search continues in the \INCLUDE directory, then in the \MY\INCLUDE directory, and finally in the directories assigned to the INCLUDE environment variable.
52+
The following command looks for the include files requested by *`main.c`* in the following order: First, if specified by using double-quotes, local files are searched. Next, search continues in the *`\include`* directory, then in the *`\my\include`* directory, and finally in the directories assigned to the **`INCLUDE`** environment variable, in left to right order.
5153

52-
```
53-
CL /I \INCLUDE /I\MY\INCLUDE MAIN.C
54+
```cmd
55+
CL /I \include /I\my\include main.c
5456
```
5557

5658
## See also

docs/build/reference/x-ignore-standard-include-paths.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
description: "Learn more about: `/X` (Ignore standard include paths)"
33
title: "/X (Ignore standard include paths)"
4-
ms.date: 07/31/2020
4+
ms.date: 01/21/2021
55
f1_keywords: ["/x", "VC.Project.VCCLCompilerTool.OVERWRITEStandardIncludePath", "VC.Project.VCCLWCECompilerTool.OVERWRITEStandardIncludePath", "VC.Project.VCCLCompilerTool.IgnoreStandardIncludePath"]
66
helpviewer_keywords: ["/X compiler option [C++]", "include files, ignore standard path", "-X compiler option [C++]", "include directories, ignore standard", "X compiler option", "Ignore Standard Include Paths compiler option"]
77
ms.assetid: 16bdf2cc-c8dc-46e4-bdcc-f3caeba5e1ef
88
---
99
# `/X` (Ignore standard include paths)
1010

11-
Prevents the compiler from searching for include files in directories specified in the PATH and INCLUDE environment variables.
11+
Prevents the compiler from searching for include files in directories specified in the `PATH` and `INCLUDE` environment variables.
1212

1313
## Syntax
1414

@@ -32,7 +32,7 @@ You can use this option with the [`/I` (Additional include directories)](i-addit
3232

3333
## Example
3434

35-
In the following command, **`/X`** tells the compiler to ignore locations specified by the PATH and INCLUDE environment variables, and **`/I`** specifies the directory to look in for include files:
35+
In the following command, **`/X`** tells the compiler to ignore locations specified by the `PATH` and `INCLUDE` environment variables, and **`/I`** specifies the directory to look in for include files:
3636

3737
```cmd
3838
CL /X /I \ALT\INCLUDE MAIN.C

docs/code-quality/code-analysis-for-c-cpp-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ C:\>cl /analyze Sample.cpp
4040

4141
## #pragma support
4242

43-
You can use the `#pragma` directive to treat warnings as errors; enable or disable warnings, and suppress warnings for individual lines of code. For more information, see [Pragma Directives and the __Pragma Keyword](../preprocessor/pragma-directives-and-the-pragma-keyword.md).
43+
You can use the `#pragma` directive to treat warnings as errors; enable or disable warnings, and suppress warnings for individual lines of code. For more information, see [Pragma directives and the `__pragma` and `_Pragma` keywords](../preprocessor/pragma-directives-and-the-pragma-keyword.md).
4444

4545
## Annotation support
4646

docs/preprocessor/alloc-text.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
---
2-
description: "Learn more about: alloc_text pragma"
2+
description: "Learn more about the alloc_text pragma directive in Microsoft C/C++"
33
title: "alloc_text pragma"
4-
ms.date: "08/29/2019"
4+
ms.date: 01/22/2021
55
f1_keywords: ["vc-pragma.alloc_text", "alloc_text_CPP"]
6-
helpviewer_keywords: ["alloc_text pragma", "pragmas, alloc_text"]
7-
ms.assetid: 1fd7be18-e4f7-4f70-b079-6326f72b871a
6+
helpviewer_keywords: ["alloc_text pragma", "pragma, alloc_text"]
7+
no-loc: ["pragma"]
88
---
9-
# alloc_text pragma
9+
# `alloc_text` pragma
1010

11-
Names the code section where the specified function definitions are to reside. The pragma must occur between a function declarator and the function definition for the named functions.
11+
Names the code section where the specified function definitions are placed. The pragma must occur between a function declarator and the function definition for the named functions.
1212

1313
## Syntax
1414

15-
> **#pragma alloc_text(** "*textsection*" **,** *function1* [**,** *function2* ... ] **)**
15+
> **`#pragma alloc_text(`** "*text-section*" **`,`** *function_1* [**`,`** *function_2* ... ] **`)`**
1616
1717
## Remarks
1818

19-
The **alloc_text** pragma does not handle C++ member functions or overloaded functions. It is applicable only to functions declared with C linkagethat is, functions declared with the **extern "C"** linkage specification. If you attempt to use this pragma on a function with C++ linkage, a compiler error is generated.
19+
The **`alloc_text`** pragma doesn't handle C++ member functions or overloaded functions. It's applicable only to functions declared with C linkage, that is, functions declared with the **`extern "C"`** linkage specification. If you attempt to use this pragma on a function with C++ linkage, a compiler error is generated.
2020

21-
Since function addressing using **`__based`** is not supported, specifying section locations requires the use of the **alloc_text** pragma. The name specified by *textsection* should be enclosed in double quotation marks.
21+
Since function addressing using **`__based`** isn't supported, specifying section locations requires the use of the **`alloc_text`** pragma. The name specified by *text-section* should be enclosed in double quotation marks.
2222

23-
The **alloc_text** pragma must appear after the declarations of any of the specified functions and before the definitions of these functions.
23+
The **`alloc_text`** pragma must appear after the declarations of any of the specified functions and before the definitions of these functions.
2424

25-
Functions referenced in an **alloc_text** pragma should be defined in the same module as the pragma. Otherwise, if an undefined function is later compiled into a different text section, the error may or may not be caught. Although the program will usually run correctly, the function will not be allocated in the intended sections.
25+
Functions referenced in an **`alloc_text`** pragma should be defined in the same module as the pragma. Otherwise, if an undefined function is later compiled into a different text section, the error may or may not be caught. Although the program will usually run correctly, the function won't be allocated in the intended sections.
2626

27-
Other limitations on **alloc_text** are as follows:
27+
Other limitations on **`alloc_text`** are as follows:
2828

2929
- It can't be used inside a function.
3030

3131
- It must be used after the function has been declared, but before the function has been defined.
3232

3333
## See also
3434

35-
[Pragma directives and the __pragma keyword](../preprocessor/pragma-directives-and-the-pragma-keyword.md)
35+
[Pragma directives and the `__pragma` and `_Pragma` keywords](./pragma-directives-and-the-pragma-keyword.md)

docs/preprocessor/auto-inline.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
---
2-
description: "Learn more about: auto_inline pragma"
2+
description: "Learn more about the auto_inline pragma directive in Microsoft C/C++"
33
title: "auto_inline pragma"
4-
ms.date: "08/29/2019"
4+
ms.date: 01/22/2021
55
f1_keywords: ["auto_inline_CPP", "vc-pragma.auto_inline"]
6-
helpviewer_keywords: ["pragmas, auto_inline", "auto_inline pragma"]
7-
ms.assetid: f7624cd1-be76-429a-881c-65c9040acf43
6+
helpviewer_keywords: ["pragma, auto_inline", "auto_inline pragma"]
7+
no-loc: ["pragma"]
88
---
9-
# auto_inline pragma
9+
# `auto_inline` pragma
1010

11-
Excludes any functions defined within the range where **off** is specified from being considered as candidates for automatic inline expansion.
11+
Excludes any functions defined within the range where **`off`** is specified from being considered as candidates for automatic inline expansion.
1212

1313
## Syntax
1414

15-
> **#pragma auto_inline(** [ { **on** | **off** } ] **)**
15+
> **`#pragma auto_inline(`** [ { **`on`** | **`off`** } ] **`)`**
1616
1717
## Remarks
1818

19-
To use the **auto_inline** pragma, place it before and immediately after, not inside, a function definition. The pragma takes effect as soon as the first function definition after the pragma is seen.
19+
To use the **`auto_inline`** pragma, place it before and immediately after, not inside, a function definition. The pragma takes effect as soon as the first function definition after the pragma is seen.
2020

2121
## See also
2222

23-
[Pragma directives and the __pragma keyword](../preprocessor/pragma-directives-and-the-pragma-keyword.md)
23+
[Pragma directives and the `__pragma` and `_Pragma` keywords](./pragma-directives-and-the-pragma-keyword.md)

docs/preprocessor/bss-seg.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
---
2-
description: "Learn more about: bss_seg pragma"
2+
description: "Learn more about the bss_seg pragma directive in Microsoft C/C++"
33
title: "bss_seg pragma"
4-
ms.date: "08/29/2019"
4+
ms.date: 01/22/2021
55
f1_keywords: ["vc-pragma.bss_seg", "bss_seg_CPP"]
6-
helpviewer_keywords: ["pragmas, bss_seg", "bss_seg pragma"]
7-
ms.assetid: 755f0154-de51-4778-97d3-c9b24e445079
6+
helpviewer_keywords: ["pragma, bss_seg", "bss_seg pragma"]
7+
no-loc: ["pragma"]
88
---
9-
# bss_seg pragma
9+
# `bss_seg` pragma
1010

1111
Specifies the section (segment) where uninitialized variables are stored in the object (.obj) file.
1212

1313
## Syntax
1414

15-
> **#pragma bss_seg(** [ "*section-name*" [ **,** "*section-class*" ] ] **)**\
16-
> **#pragma bss_seg(** { **push** | **pop** } [ **,** *identifier* ] [ **,** "*section-name*" [ **,** "*section-class*" ] ] **)**
15+
> **`#pragma bss_seg(`** [ "*section-name*" [ **`,`** "*section-class*" ] ] **`)`**\
16+
> **`#pragma bss_seg(`** { **`push`** | **`pop`** } [ **`,`** *identifier* ] [ **`,`** "*section-name*" [ **`,`** "*section-class*" ] ] **`)`**
1717
1818
### Parameters
1919

20-
**push**\
21-
(Optional) Puts a record on the internal compiler stack. A **push** can have an *identifier* and *section-name*.
20+
**`push`**\
21+
(Optional) Puts a record on the internal compiler stack. A **`push`** can have an *identifier* and *section-name*.
2222

23-
**pop**\
24-
(Optional) Removes a record from the top of the internal compiler stack. A **pop** can have an *identifier* and *section-name*. You can pop multiple records using just one **pop** command by using the *identifier*. The *section-name* becomes the active BSS section name after the pop.
23+
**`pop`**\
24+
(Optional) Removes a record from the top of the internal compiler stack. A **`pop`** can have an *identifier* and *section-name*. You can pop multiple records using just one **`pop`** command by using the *identifier*. The *section-name* becomes the active BSS section name after the pop.
2525

2626
*identifier*\
27-
(Optional) When used with **push**, assigns a name to the record on the internal compiler stack. When used with **pop**, the directive pops records off the internal stack until *identifier* is removed. If *identifier* isn't found on the internal stack, nothing is popped.
27+
(Optional) When used with **`push`**, assigns a name to the record on the internal compiler stack. When used with **`pop`**, the directive pops records off the internal stack until *identifier* is removed. If *identifier* isn't found on the internal stack, nothing is popped.
2828

2929
*"section-name"*\
30-
(Optional) The name of a section. When used with **pop**, the stack is popped and *section-name* becomes the active BSS section name.
30+
(Optional) The name of a section. When used with **`pop`**, the stack is popped and *section-name* becomes the active BSS section name.
3131

3232
*"section-class"*\
3333
(Optional) Ignored, but included for compatibility with versions of Microsoft C++ earlier than version 2.0.
@@ -36,13 +36,13 @@ Specifies the section (segment) where uninitialized variables are stored in the
3636

3737
A *section* in an object file is a named block of data that's loaded into memory as a unit. A *BSS section* is a section that contains uninitialized data. In this article, the terms *segment* and *section* have the same meaning.
3838

39-
The **bss_seg** pragma directive tells the compiler to put all uninitialized data items from the translation unit into a BSS section named *section-name*. In some cases, use of **bss_seg** can speed load times by grouping uninitialized data into one section. By default, the BSS section used for uninitialized data in an object file is named `.bss`. A **bss_seg** pragma directive without a *section-name* parameter resets the BSS section name for the subsequent uninitialized data items to `.bss`.
39+
The **`bss_seg`** pragma directive tells the compiler to put all uninitialized data items from the translation unit into a BSS section named *section-name*. In some cases, use of **`bss_seg`** can speed load times by grouping uninitialized data into one section. By default, the BSS section used for uninitialized data in an object file is named `.bss`. A **`bss_seg`** pragma directive without a *section-name* parameter resets the BSS section name for the subsequent uninitialized data items to `.bss`.
4040

41-
Data allocated using the **bss_seg** pragma does not retain any information about its location.
41+
Data allocated using the **`bss_seg`** pragma does not retain any information about its location.
4242

43-
For a list of names that shouldn't be used to create a section, see [/SECTION](../build/reference/section-specify-section-attributes.md).
43+
For a list of names that shouldn't be used to create a section, see [`/SECTION`](../build/reference/section-specify-section-attributes.md).
4444

45-
You can also specify sections for initialized data ([data_seg](../preprocessor/data-seg.md)), functions ([code_seg](../preprocessor/code-seg.md)), and const variables ([const_seg](../preprocessor/const-seg.md)).
45+
You can also specify sections for initialized data ([`data_seg`](../preprocessor/data-seg.md)), functions ([`code_seg`](../preprocessor/code-seg.md)), and const variables ([`const_seg`](../preprocessor/const-seg.md)).
4646

4747
You can use the [DUMPBIN.EXE](../build/reference/dumpbin-command-line.md) application to view object files. Versions of DUMPBIN for each supported target architecture are included with Visual Studio.
4848

@@ -66,4 +66,4 @@ int main() {
6666

6767
## See also
6868

69-
[Pragma directives and the __pragma keyword](../preprocessor/pragma-directives-and-the-pragma-keyword.md)
69+
[Pragma directives and the `__pragma` and `_Pragma` keywords](./pragma-directives-and-the-pragma-keyword.md)

0 commit comments

Comments
 (0)