blob: b42308fabc2a51e62e5708f83bc4dd8aeeee225b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
/* Test various erroneous or ignored uses of C23 attribute syntax. */
/* { dg-do compile } */
/* { dg-options "-fgnu-tm" } */
void
f1 (void)
{
__transaction_atomic [[outer()]] {} /* { dg-error "does not take any arguments" } */
}
void
f2 (void)
{
__transaction_atomic [[not_a_tm_attribute]] {} /* { dg-warning "attribute directive ignored" } */
}
void
f3 (void)
{
__transaction_atomic [[unknown_attribute(args of *unknown* attributes need only (be {balanced[(({{[[]]}}))]}!), as per standard C)]] {} /* { dg-warning "attribute directive ignored" } */
}
void
f4 (void)
{
__transaction_atomic [[gnu::const]] {} /* { dg-warning "attribute directive ignored" } */
}
void
f5 (void)
{
__transaction_atomic [[bad_namespace::outer]] {} /* { dg-warning "attribute directive ignored" } */
}
void
f6 (void)
{
__transaction_atomic [[outer, outer]] {} /* { dg-warning "attribute duplicated" } */
}
|