tmp/tmpktul5ywc/{from.md → to.md}
RENAMED
|
@@ -21,14 +21,17 @@ declaration of that function specifies the `carries_dependency`
|
|
| 21 |
attribute for that parameter. If a function or one of its parameters is
|
| 22 |
declared with the `carries_dependency` attribute in its first
|
| 23 |
declaration in one translation unit and the same function or one of its
|
| 24 |
parameters is declared without the `carries_dependency` attribute in its
|
| 25 |
first declaration in another translation unit, the program is
|
| 26 |
-
ill-formed
|
| 27 |
|
| 28 |
-
The `carries_dependency` attribute does not change the
|
| 29 |
-
program, but may result in generation of more efficient
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
``` cpp
|
| 32 |
/* Translation unit A. */
|
| 33 |
|
| 34 |
struct foo { int* a; int* b; };
|
|
@@ -69,5 +72,7 @@ Function `g`’s second parameter has a `carries_dependency` attribute,
|
|
| 69 |
but its first parameter does not. Therefore, function `h`’s first call
|
| 70 |
to `g` carries a dependency into `g`, but its second call does not. The
|
| 71 |
implementation might need to insert a fence prior to the second call to
|
| 72 |
`g`.
|
| 73 |
|
|
|
|
|
|
|
|
|
| 21 |
attribute for that parameter. If a function or one of its parameters is
|
| 22 |
declared with the `carries_dependency` attribute in its first
|
| 23 |
declaration in one translation unit and the same function or one of its
|
| 24 |
parameters is declared without the `carries_dependency` attribute in its
|
| 25 |
first declaration in another translation unit, the program is
|
| 26 |
+
ill-formed, no diagnostic required.
|
| 27 |
|
| 28 |
+
[*Note 1*: The `carries_dependency` attribute does not change the
|
| 29 |
+
meaning of the program, but may result in generation of more efficient
|
| 30 |
+
code. — *end note*]
|
| 31 |
+
|
| 32 |
+
[*Example 1*:
|
| 33 |
|
| 34 |
``` cpp
|
| 35 |
/* Translation unit A. */
|
| 36 |
|
| 37 |
struct foo { int* a; int* b; };
|
|
|
|
| 72 |
but its first parameter does not. Therefore, function `h`’s first call
|
| 73 |
to `g` carries a dependency into `g`, but its second call does not. The
|
| 74 |
implementation might need to insert a fence prior to the second call to
|
| 75 |
`g`.
|
| 76 |
|
| 77 |
+
— *end example*]
|
| 78 |
+
|