Skip to content

Commit 8612e74

Browse files
author
Colin Robertson
committed
Acrolinx pass
1 parent 42f6694 commit 8612e74

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

docs/preprocessor/alloc-text.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ no-loc: ["pragma"]
88
---
99
# `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 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.
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

2323
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

2727
Other limitations on **`alloc_text`** are as follows:
2828

docs/preprocessor/comment-c-cpp.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ Places a comment record into an object file or executable file.
1616
1717
## Remarks
1818

19-
The *comment-type* is one of the predefined identifiers, described below, that specifies the type of comment record. The optional *comment-string* is a string literal that provides additional information for some comment types. Because *comment-string* is a string literal, it obeys all the rules for string literals with respect to escape characters, embedded quotation marks (`"`), and concatenation.
19+
The *comment-type* is one of the predefined identifiers, described below, that specifies the type of comment record. The optional *comment-string* is a string literal that provides additional information for some comment types. Because *comment-string* is a string literal, it obeys all the rules for string literals on use of escape characters, embedded quotation marks (`"`), and concatenation.
2020

2121
### compiler
2222

2323
Places the name and version number of the compiler in the object file. This comment record is ignored by the linker. If you supply a *comment-string* parameter for this record type, the compiler generates a warning.
2424

2525
### lib
2626

27-
Places a library-search record in the object file. This comment type must be accompanied by a *comment-string* parameter containing the name (and possibly the path) of the library that you want the linker to search. The library name follows the default library-search records in the object file; the linker searches for this library just as if you had named it on the command line provided that the library is not specified with [`/nodefaultlib`](../build/reference/nodefaultlib-ignore-libraries.md). You can place multiple library-search records in the same source file; each record appears in the object file in the same order in which it is encountered in the source file.
27+
Places a library-search record in the object file. This comment type must be accompanied by a *comment-string* parameter that has the name (and possibly the path) of the library that you want the linker to search. The library name follows the default library-search records in the object file. The linker searches for this library the same way as if you specified it on the command line, as long as the library isn't specified by using [`/nodefaultlib`](../build/reference/nodefaultlib-ignore-libraries.md). You can place multiple library-search records in the same source file. Each record appears in the object file in the same order it's found in the source file.
2828

29-
If the order of the default library and an added library is important, compiling with the [`/Zl`](../build/reference/zl-omit-default-library-name.md) switch will prevent the default library name from being placed in the object module. A second comment pragma then can be used to insert the name of the default library after the added library. The libraries listed with these pragma directives will appear in the object module in the same order they are found in the source code.
29+
If the order of the default library and an added library is important, compiling with the [`/Zl`](../build/reference/zl-omit-default-library-name.md) switch will prevent the default library name from being placed in the object module. A second comment pragma then can be used to insert the name of the default library after the added library. The libraries listed with these pragma directives will appear in the object module in the same order they're found in the source code.
3030

3131
### linker
3232

@@ -56,7 +56,7 @@ Places a general comment in the object file. The *comment-string* parameter cont
5656

5757
## Examples
5858

59-
The following pragma causes the linker to search for the EMAPI.LIB library while linking. The linker searches first in the current working directory and then in the path specified in the LIB environment variable.
59+
The following pragma causes the linker to search for the EMAPI.LIB library while linking. The linker searches first in the current working directory, and then in the path specified in the LIB environment variable.
6060

6161
```C
6262
#pragma comment( lib, "emapi" )
@@ -68,7 +68,7 @@ The following pragma causes the compiler to place the name and version number of
6868
#pragma comment( compiler )
6969
```
7070

71-
For comments that take a *comment-string* parameter, you can use a macro in any place where you would use a string literal, provided that the macro expands to a string literal. You can also concatenate any combination of string literals and macros that expand to string literals. For example, the following statement is acceptable:
71+
For comments that take a *comment-string* parameter, you can use a macro in any place where you would use a string literal, as long as the macro expands to a string literal. You can also concatenate any combination of string literals and macros that expand to string literals. For example, the following statement is acceptable:
7272

7373
```C
7474
#pragma comment( user, "Compiled on " __DATE__ " at " __TIME__ )

docs/preprocessor/execution-character-set.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ no-loc: ["pragma"]
88
---
99
# `execution_character_set` pragma
1010

11-
Specifies the execution character set used for string and character literals. This directive is not needed for literals marked with the `u8` prefix.
11+
Specifies the execution character set used for string and character literals. This directive isn't needed for literals marked with the `u8` prefix.
1212

1313
## Syntax
1414

@@ -25,9 +25,9 @@ This compiler directive is obsolete starting in Visual Studio 2015 Update 2. We
2525

2626
The `#pragma execution_character_set("utf-8")` directive tells the compiler to encode narrow character and narrow string literals in your source code as UTF-8 in the executable. This output encoding is independent of the source file encoding used.
2727

28-
By default, the compiler encodes narrow characters and narrow strings by using the current code page as the execution character set. This means that Unicode or DBCS characters in a literal that are outside the range of the current code page are converted to the default replacement character in the output. Unicode and DBCS characters are truncated to their low-order byte. This is almost certainly not what you intend. You can specify UTF-8 encoding for literals in the source file by using a `u8` prefix. The compiler passes these UTF-8 encoded strings to the output unchanged. Narrow character literals prefixed by using u8 must fit in one byte, or they are truncated on output.
28+
By default, the compiler encodes narrow characters and narrow strings by using the current code page as the execution character set. It means that Unicode or DBCS characters outside the range of the current code page get converted to the default replacement character in the output. Unicode and DBCS characters are truncated to their low-order byte, which is almost never what you intend. You can specify UTF-8 encoding for literals in the source file by using a `u8` prefix. The compiler passes these UTF-8 encoded strings to the output unchanged. Narrow character literals prefixed by using u8 must fit in a byte, or they're truncated on output.
2929

30-
By default, Visual Studio uses the current code page as the source character set used to interpret your source code for output. When a file is read in, Visual Studio interprets it according to the current code page unless the file code page was set, or unless a byte-order mark (BOM) or UTF-16 characters are detected at the beginning of the file. Because UTF-8 can't be set as the current code page, when the automatic detection encounters source files encoded as UTF-8 without a BOM, Visual Studio assumes that they are encoded by using the current code page. Characters in the source file that are outside the range of the specified or automatically detected code page can cause compiler warnings and errors.
30+
By default, Visual Studio uses the current code page as the source character set used to interpret your source code for output. When a file is read in, Visual Studio interprets it according to the current code page unless the file code page was set, or unless a byte-order mark (BOM) or UTF-16 characters are detected at the beginning of the file. You can't set UTF-8 as the current code page in some versions of Windows. When the automatic detection finds source files encoded as UTF-8 without a BOM in those versions, Visual Studio assumes they're encoded by using the current code page. Characters in the source file that are outside the range of the specified or automatically detected code page can cause compiler warnings and errors.
3131

3232
## See also
3333

docs/preprocessor/include-alias.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ The filename reported in error messages, or as the value of the predefined `__FI
7979
#include "VERYLONGFILENAME.H"
8080
```
8181

82-
An error in *VERYLONGFILENAME.H* produces the following error message:
82+
An error in *`VERYLONGFILENAME.H`* produces the following error message:
8383

8484
```Output
8585
myfile.h(15) : error C2059 : syntax error
@@ -93,7 +93,7 @@ Also note that transitivity isn't supported. Given the following directives,
9393
#include "one.h"
9494
```
9595

96-
the compiler searches for the file *two.h* rather than *three.h*.
96+
the compiler searches for the file *`two.h`* rather than *`three.h`*.
9797

9898
## See also
9999

0 commit comments

Comments
 (0)