tmp/tmpjus_oiwb/{from.md → to.md}
RENAMED
|
@@ -13,10 +13,12 @@ and replacing each escape sequence `\\` by a single backslash. The
|
|
| 13 |
resulting sequence of characters is processed through translation phase
|
| 14 |
3 to produce preprocessing tokens that are executed as if they were the
|
| 15 |
*pp-tokens* in a pragma directive. The original four preprocessing
|
| 16 |
tokens in the unary operator expression are removed.
|
| 17 |
|
|
|
|
|
|
|
| 18 |
``` cpp
|
| 19 |
#pragma listing on "..\listing.dir"
|
| 20 |
```
|
| 21 |
|
| 22 |
can also be expressed as:
|
|
@@ -33,10 +35,12 @@ literally as shown, or results from macro replacement, as in:
|
|
| 33 |
#define PRAGMA(x) _Pragma(#x)
|
| 34 |
|
| 35 |
LISTING( ..\listing.dir )
|
| 36 |
```
|
| 37 |
|
|
|
|
|
|
|
| 38 |
<!-- Link reference definitions -->
|
| 39 |
[basic.stc.dynamic.safety]: basic.md#basic.stc.dynamic.safety
|
| 40 |
[cpp]: #cpp
|
| 41 |
[cpp.concat]: #cpp.concat
|
| 42 |
[cpp.cond]: #cpp.cond
|
|
@@ -52,69 +56,60 @@ LISTING( ..\listing.dir )
|
|
| 52 |
[cpp.scope]: #cpp.scope
|
| 53 |
[cpp.stringize]: #cpp.stringize
|
| 54 |
[cpp.subst]: #cpp.subst
|
| 55 |
[cstdint]: language.md#cstdint
|
| 56 |
[expr.const]: expr.md#expr.const
|
|
|
|
| 57 |
[intro.multithread]: intro.md#intro.multithread
|
| 58 |
[lex.digraph]: lex.md#lex.digraph
|
| 59 |
[lex.name]: lex.md#lex.name
|
| 60 |
[lex.phases]: lex.md#lex.phases
|
| 61 |
[lex.token]: lex.md#lex.token
|
| 62 |
[support.limits]: language.md#support.limits
|
| 63 |
|
| 64 |
-
[^1]: Thus, preprocessing directives are commonly called “lines
|
| 65 |
“lines” have no other syntactic significance, as all white space is
|
| 66 |
equivalent except in certain situations during preprocessing (see
|
| 67 |
the `#` character string literal creation operator in
|
| 68 |
[[cpp.stringize]], for example).
|
| 69 |
|
| 70 |
[^2]: Because the controlling constant expression is evaluated during
|
| 71 |
translation phase 4, all identifiers either are or are not macro
|
| 72 |
names — there simply are no keywords, enumeration constants, etc.
|
| 73 |
|
| 74 |
-
[^3]:
|
| 75 |
-
when its spelling consists entirely of letters and underscores.
|
| 76 |
-
Therefore it is not subject to this replacement.
|
| 77 |
-
|
| 78 |
-
[^4]: Thus on an implementation where `std::numeric_limits<int>::max()`
|
| 79 |
-
is `0x7FFF` and `std::numeric_limits<unsigned int>::max()` is
|
| 80 |
-
`0xFFFF`, the integer literal `0x8000` is signed and positive within
|
| 81 |
-
a `#if` expression even though it is unsigned in translation phase
|
| 82 |
-
7 ([[lex.phases]]).
|
| 83 |
-
|
| 84 |
-
[^5]: Thus, the constant expression in the following `#if` directive and
|
| 85 |
-
`if` statement is not guaranteed to evaluate to the same value in
|
| 86 |
-
these two contexts.
|
| 87 |
-
|
| 88 |
-
[^6]: As indicated by the syntax, a preprocessing token shall not follow
|
| 89 |
a `#else` or `#endif` directive before the terminating new-line
|
| 90 |
character. However, comments may appear anywhere in a source file,
|
| 91 |
including within a preprocessing directive.
|
| 92 |
|
| 93 |
-
[^
|
| 94 |
single string literal (see the translation phases in
|
| 95 |
[[lex.phases]]); thus, an expansion that results in two string
|
| 96 |
literals is an invalid directive.
|
| 97 |
|
| 98 |
-
[^
|
| 99 |
string literals are preprocessing tokens, not sequences possibly
|
| 100 |
containing identifier-like subsequences (see [[lex.phases]],
|
| 101 |
translation phases), they are never scanned for macro names or
|
| 102 |
parameters.
|
| 103 |
|
| 104 |
-
[^
|
| 105 |
when its spelling consists entirely of letters and underscores.
|
| 106 |
Therefore it is not possible to define a macro whose name is the
|
| 107 |
same as that of an alternative token.
|
| 108 |
|
| 109 |
-
[^
|
|
|
|
| 110 |
|
| 111 |
-
[^
|
| 112 |
because they are temporary entities that exist only within
|
| 113 |
translation phase 4.
|
| 114 |
|
| 115 |
-
[^
|
| 116 |
-
the value of this macro with a greater value.
|
| 117 |
-
compilers should use a value with at most five
|
|
|
|
| 118 |
|
| 119 |
-
[^
|
| 120 |
-
|
|
|
|
|
|
|
|
|
| 13 |
resulting sequence of characters is processed through translation phase
|
| 14 |
3 to produce preprocessing tokens that are executed as if they were the
|
| 15 |
*pp-tokens* in a pragma directive. The original four preprocessing
|
| 16 |
tokens in the unary operator expression are removed.
|
| 17 |
|
| 18 |
+
[*Example 1*:
|
| 19 |
+
|
| 20 |
``` cpp
|
| 21 |
#pragma listing on "..\listing.dir"
|
| 22 |
```
|
| 23 |
|
| 24 |
can also be expressed as:
|
|
|
|
| 35 |
#define PRAGMA(x) _Pragma(#x)
|
| 36 |
|
| 37 |
LISTING( ..\listing.dir )
|
| 38 |
```
|
| 39 |
|
| 40 |
+
— *end example*]
|
| 41 |
+
|
| 42 |
<!-- Link reference definitions -->
|
| 43 |
[basic.stc.dynamic.safety]: basic.md#basic.stc.dynamic.safety
|
| 44 |
[cpp]: #cpp
|
| 45 |
[cpp.concat]: #cpp.concat
|
| 46 |
[cpp.cond]: #cpp.cond
|
|
|
|
| 56 |
[cpp.scope]: #cpp.scope
|
| 57 |
[cpp.stringize]: #cpp.stringize
|
| 58 |
[cpp.subst]: #cpp.subst
|
| 59 |
[cstdint]: language.md#cstdint
|
| 60 |
[expr.const]: expr.md#expr.const
|
| 61 |
+
[expr.new]: expr.md#expr.new
|
| 62 |
[intro.multithread]: intro.md#intro.multithread
|
| 63 |
[lex.digraph]: lex.md#lex.digraph
|
| 64 |
[lex.name]: lex.md#lex.name
|
| 65 |
[lex.phases]: lex.md#lex.phases
|
| 66 |
[lex.token]: lex.md#lex.token
|
| 67 |
[support.limits]: language.md#support.limits
|
| 68 |
|
| 69 |
+
[^1]: Thus, preprocessing directives are commonly called “lines”. These
|
| 70 |
“lines” have no other syntactic significance, as all white space is
|
| 71 |
equivalent except in certain situations during preprocessing (see
|
| 72 |
the `#` character string literal creation operator in
|
| 73 |
[[cpp.stringize]], for example).
|
| 74 |
|
| 75 |
[^2]: Because the controlling constant expression is evaluated during
|
| 76 |
translation phase 4, all identifiers either are or are not macro
|
| 77 |
names — there simply are no keywords, enumeration constants, etc.
|
| 78 |
|
| 79 |
+
[^3]: As indicated by the syntax, a preprocessing token shall not follow
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
a `#else` or `#endif` directive before the terminating new-line
|
| 81 |
character. However, comments may appear anywhere in a source file,
|
| 82 |
including within a preprocessing directive.
|
| 83 |
|
| 84 |
+
[^4]: Note that adjacent string literals are not concatenated into a
|
| 85 |
single string literal (see the translation phases in
|
| 86 |
[[lex.phases]]); thus, an expansion that results in two string
|
| 87 |
literals is an invalid directive.
|
| 88 |
|
| 89 |
+
[^5]: Since, by macro-replacement time, all character literals and
|
| 90 |
string literals are preprocessing tokens, not sequences possibly
|
| 91 |
containing identifier-like subsequences (see [[lex.phases]],
|
| 92 |
translation phases), they are never scanned for macro names or
|
| 93 |
parameters.
|
| 94 |
|
| 95 |
+
[^6]: An alternative token ([[lex.digraph]]) is not an identifier, even
|
| 96 |
when its spelling consists entirely of letters and underscores.
|
| 97 |
Therefore it is not possible to define a macro whose name is the
|
| 98 |
same as that of an alternative token.
|
| 99 |
|
| 100 |
+
[^7]: A *conditionally-supported-directive* is a preprocessing directive
|
| 101 |
+
regardless of whether the implementation supports it.
|
| 102 |
|
| 103 |
+
[^8]: Placemarker preprocessing tokens do not appear in the syntax
|
| 104 |
because they are temporary entities that exist only within
|
| 105 |
translation phase 4.
|
| 106 |
|
| 107 |
+
[^9]: It is intended that future versions of this International Standard
|
| 108 |
+
will replace the value of this macro with a greater value.
|
| 109 |
+
Non-conforming compilers should use a value with at most five
|
| 110 |
+
decimal digits.
|
| 111 |
|
| 112 |
+
[^10]: The presumed source file name can be changed by the `#line`
|
| 113 |
+
directive.
|
| 114 |
+
|
| 115 |
+
[^11]: The presumed line number can be changed by the `#line` directive.
|