| 1 |
// { dg-do compile { target c++11 } } |
| 2 |
|
| 3 |
[[carries_dependency]] int *f1 (); // { dg-warning "attribute ignored" } |
| 4 |
int f2 (int *x [[carries_dependency]]); // { dg-warning "attribute ignored" } |
| 5 |
[[carries_dependency]] int f3 (); // { dg-warning "attribute ignored" } |
| 6 |
int f4 (int x [[carries_dependency]]); // { dg-warning "attribute ignored" } |
| 7 |
[[carries_dependency(1)]] int f5 (); // { dg-error "'carries_dependency' attribute does not take any arguments" } |
| 8 |
[[carries_dependency]] int v; // { dg-warning "'carries_dependency' attribute can only be applied to functions or parameters" } |
| 9 |
[[carries_dependency]]; // { dg-warning "attribute ignored" } |
| 10 |
void |
| 11 |
f6 () |
| 12 |
{ |
| 13 |
[[carries_dependency]]; // { dg-warning "attributes at the beginning of statement are ignored" } |
| 14 |
} |
| 15 |
#if __has_cpp_attribute(carries_dependency) |
| 16 |
#error carries_dependency attribute is not actually implemented |
| 17 |
#endif |