@@ -7,41 +7,41 @@ union empty_union {};
77
88void f () {
99 _Generic(1 ,
10- int : 1 , // COMPLIANT
11- const int : 1 , // NON-COMPLIANT
12- volatile int : 1 , // NON-COMPLIANT
13- _Atomic int : 1 , // NON-COMPLIANT
14- int * : 1 , // COMPLIANT
15- int const * : 1 , // COMPLIANT
16- const volatile int : 1 , // NON-COMPLIANT
17- int volatile const * : 1 , // COMPLIANT
18- struct {}: 1 , // NON-COMPLIANT
19- struct {} * : 1 , // NON-COMPLIANT
20- empty_struct_t : 1 , // COMPLIANT
21- struct empty_struct : 1 , // COMPLIANT
22- empty_struct_t * : 1 , // COMPLIANT
23- struct empty_struct * : 1 , // COMPLIANT
24- union {}: 1 , // NON-COMPLIANT
25- union {} * : 1 , // NON-COMPLIANT
26- empty_union_t : 1 , // COMPLIANT
27- union empty_union : 1 , // COMPLIANT
28- empty_union_t * : 1 , // COMPLIANT
29- union empty_union * : 1 , // COMPLIANT
30- // int[]: 1, // compile error
31- int [3 ]: 1 , // NON-COMPLIANT
32- int (* )[3 ]: 1 , // COMPLIANT: pointer to array OK
33- // int (int*): 1, // compile error
34- int (* )(int * ): 1 , // COMPLIANT: function pointers OK
35- default : 1 // COMPLIANT
10+ int : 1 , // COMPLIANT
11+ const int : 1 , // NON-COMPLIANT
12+ volatile int : 1 , // NON-COMPLIANT
13+ _Atomic int : 1 , // NON-COMPLIANT
14+ int * : 1 , // COMPLIANT
15+ int const * : 1 , // COMPLIANT
16+ const volatile int : 1 , // NON-COMPLIANT
17+ int volatile const * : 1 , // COMPLIANT
18+ struct {} : 1 , // NON-COMPLIANT
19+ struct {} * : 1 , // NON-COMPLIANT
20+ empty_struct_t : 1 , // COMPLIANT
21+ struct empty_struct : 1 , // COMPLIANT
22+ empty_struct_t * : 1 , // COMPLIANT
23+ struct empty_struct * : 1 , // COMPLIANT
24+ union {} : 1 , // NON-COMPLIANT
25+ union {} * : 1 , // NON-COMPLIANT
26+ empty_union_t : 1 , // COMPLIANT
27+ union empty_union : 1 , // COMPLIANT
28+ empty_union_t * : 1 , // COMPLIANT
29+ union empty_union * : 1 , // COMPLIANT
30+ // int[]: 1, // compile error
31+ int [3 ] : 1 , // NON-COMPLIANT
32+ int (* )[3 ] : 1 , // COMPLIANT: pointer to array OK
33+ // int (int*): 1, // compile error
34+ int (* )(int * ) : 1 , // COMPLIANT: function pointers OK
35+ default : 1 // COMPLIANT
3636 );
3737}
3838
3939// NON-COMPLIANT
40- #define M1 (X ) _Generic((X), const int: 1, default: 0)
40+ #define M1 (X ) _Generic((X), const int : 1, default : 0)
4141// NON-COMPLIANT
42- #define M2 (X ) _Generic(1, X[3]: 1, default: 0)
42+ #define M2 (X ) _Generic(1, X[3] : 1, default : 0)
4343// COMPLIANT
44- #define M3 (X ) _Generic(1, X: 1, default: 0)
44+ #define M3 (X ) _Generic(1, X : 1, default : 0)
4545
4646void f2 () {
4747 M1 (1 );
@@ -60,12 +60,12 @@ typedef long const *long_const_ptr;
6060
6161void f3 () {
6262 _Generic(1 ,
63- int_t : 1 , // COMPLIANT
64- const_int : 1 , // NON-COMPLIANT
65- const_int_ptr : 1 , // COMPLIANT
66- long_const_ptr : 1 , // COMPLIANT
67- const int_ptr : 1 , // COMPLIANT
68- default : 1 // COMPLIANT
63+ int_t : 1 , // COMPLIANT
64+ const_int : 1 , // NON-COMPLIANT
65+ const_int_ptr : 1 , // COMPLIANT
66+ long_const_ptr : 1 , // COMPLIANT
67+ const int_ptr : 1 , // COMPLIANT
68+ default : 1 // COMPLIANT
6969 );
7070}
7171
0 commit comments