You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_Atomic(T) value;// expected-warning {{'_Atomic' is a C11 extension}}
6
6
7
7
voidf() _Atomic; // expected-error {{expected ';' at end of declaration list}}
8
8
};
@@ -17,16 +17,16 @@ user<int> u;
17
17
// Test overloading behavior of atomics.
18
18
structA { };
19
19
20
-
int &ovl1(_Atomic(int));
21
-
int &ovl1(_Atomic int); // ok, redeclaration
22
-
long &ovl1(_Atomic(long));
23
-
float &ovl1(_Atomic(float));
24
-
double &ovl1(_Atomic(A const *const *));
25
-
double &ovl1(A const *const *_Atomic);
26
-
short &ovl1(_Atomic(A **));
20
+
int &ovl1(_Atomic(int));// expected-warning {{'_Atomic' is a C11 extension}}
21
+
int &ovl1(_Atomic int); // expected-warning {{'_Atomic' is a C11 extension}} // ok, redeclaration
22
+
long &ovl1(_Atomic(long));// expected-warning {{'_Atomic' is a C11 extension}}
23
+
float &ovl1(_Atomic(float));// expected-warning {{'_Atomic' is a C11 extension}}
24
+
double &ovl1(_Atomic(A const *const *));// expected-warning {{'_Atomic' is a C11 extension}}
25
+
double &ovl1(A const *const *_Atomic);// expected-warning {{'_Atomic' is a C11 extension}}
26
+
short &ovl1(_Atomic(A **));// expected-warning {{'_Atomic' is a C11 extension}}
27
27
28
-
voidtest_overloading(int i, float f, _Atomic(int) ai, _Atomic(float) af,
29
-
long l, _Atomic(long) al, A const *const *acc,
28
+
voidtest_overloading(int i, float f, _Atomic(int) ai, _Atomic(float) af,// expected-warning 2 {{'_Atomic' is a C11 extension}}
29
+
long l, _Atomic(long) al, A const *const *acc,// expected-warning {{'_Atomic' is a C11 extension}}
30
30
A const ** ac, A **a) {
31
31
int& ir1 = ovl1(i);
32
32
int& ir2 = ovl1(ai);
@@ -39,45 +39,53 @@ void test_overloading(int i, float f, _Atomic(int) ai, _Atomic(float) af,
39
39
short &sr1 = ovl1(a);
40
40
}
41
41
42
-
typedefint (A::*fp)() _Atomic; // expected-error {{expected ';' after top level declarator}} expected-warning {{does not declare anything}}
42
+
typedefint (A::*fp)() _Atomic; // expected-error {{expected ';' after top level declarator}} expected-warning {{does not declare anything}} \
43
+
// expected-warning {{'_Atomic' is a C11 extension}}
43
44
44
-
typedef_Atomic(int(A::*)) atomic_mem_ptr_to_int;
45
-
typedefint(A::*_Atomic atomic_mem_ptr_to_int);
45
+
typedef_Atomic(int(A::*)) atomic_mem_ptr_to_int;// expected-warning {{'_Atomic' is a C11 extension}}
46
+
typedefint(A::*_Atomic atomic_mem_ptr_to_int);// expected-warning {{'_Atomic' is a C11 extension}}
46
47
47
-
typedef_Atomic(int)(A::*mem_ptr_to_atomic_int);
48
-
typedef _Atomic int(A::*mem_ptr_to_atomic_int);
48
+
typedef_Atomic(int)(A::*mem_ptr_to_atomic_int);// expected-warning {{'_Atomic' is a C11 extension}}
49
+
typedef _Atomic int(A::*mem_ptr_to_atomic_int);// expected-warning {{'_Atomic' is a C11 extension}}
49
50
50
-
typedef_Atomic(int)&atomic_int_ref;
51
-
typedef _Atomic int &atomic_int_ref;
52
-
typedef _Atomic atomic_int_ref atomic_int_ref; // expected-warning {{'_Atomic' qualifier on reference type 'atomic_int_ref' (aka '_Atomic(int) &') has no effect}}
51
+
typedef_Atomic(int)&atomic_int_ref; // expected-warning {{'_Atomic' is a C11 extension}}
52
+
typedef _Atomic int &atomic_int_ref; // expected-warning {{'_Atomic' is a C11 extension}}
53
+
typedef _Atomic atomic_int_ref atomic_int_ref; // expected-warning {{'_Atomic' qualifier on reference type 'atomic_int_ref' (aka '_Atomic(int) &') has no effect}} \
54
+
// expected-warning {{'_Atomic' is a C11 extension}}
53
55
54
-
typedefint &_Atomic atomic_reference_to_int; // expected-error {{'_Atomic' qualifier may not be applied to a reference}}
55
-
typedef_Atomic(int &) atomic_reference_to_int; // expected-error {{_Atomic cannot be applied to reference type 'int &'}}
56
+
typedefint &_Atomic atomic_reference_to_int; // expected-error {{'_Atomic' qualifier may not be applied to a reference}} \
57
+
// expected-warning {{'_Atomic' is a C11 extension}}
58
+
typedef_Atomic(int &) atomic_reference_to_int; // expected-error {{_Atomic cannot be applied to reference type 'int &'}} \
59
+
// expected-warning {{'_Atomic' is a C11 extension}}
56
60
57
61
structS {
58
-
_Atomic union { int n; }; // expected-warning {{anonymous union cannot be '_Atomic'}}
62
+
_Atomic union { int n; }; // expected-warning {{anonymous union cannot be '_Atomic'}} \
63
+
// expected-warning {{'_Atomic' is a C11 extension}}
59
64
};
60
65
61
66
namespacecopy_init {
62
67
structX {
63
68
X(int);
64
69
int n;
65
70
};
66
-
_Atomic(X) y = X(0);
67
-
_Atomic(X) z(X(0));
71
+
_Atomic(X) y = X(0);// expected-warning {{'_Atomic' is a C11 extension}}
72
+
_Atomic(X) z(X(0));// expected-warning {{'_Atomic' is a C11 extension}}
0 commit comments