@@ -8,19 +8,19 @@ enum A {
88};
99
1010struct S {
11- enum A a1 : 1 ; // #1
11+ enum A a1 : 1 ; // #S_a1_decl
1212 enum A a2 : 2 ;
1313 enum A a3 : 8 ;
14- __attribute__((preferred_type (enum A ))) // #preferred_a4
15- unsigned a4 : 1 ; // #2
14+ __attribute__((preferred_type (enum A ))) // #preferred_S_a4
15+ unsigned a4 : 1 ; // #S_a4_decl
1616 __attribute__((preferred_type (enum A )))
1717 unsigned a5 : 2 ;
1818 __attribute__((preferred_type (enum A )))
1919 unsigned a6 : 8 ;
20- __attribute__((preferred_type (enum A ))) // #preferred_a7
21- int a7 : 1 ; // #3
22- __attribute__((preferred_type (enum A ))) // #preferred_a8
23- int a8 : 2 ; // #4
20+ __attribute__((preferred_type (enum A ))) // #preferred_S_a7
21+ int a7 : 1 ; // #S_a7_decl
22+ __attribute__((preferred_type (enum A ))) // #preferred_S_a8
23+ int a8 : 2 ; // #S_a8_decl
2424 __attribute__((preferred_type (enum A )))
2525 int a9 : 8 ;
2626};
@@ -41,20 +41,20 @@ void read_enum(struct S *s) {
4141void write_enum (struct S * s , enum A x ) {
4242 s -> a1 = x ;
4343 // expected-warning@-1 {{bit-field 'a1' is not wide enough to store all enumerators of 'A'}}
44- // expected-note@#1 {{widen this field to 2 bits to store all values of 'A'}}
44+ // expected-note@#S_a1_decl {{widen this field to 2 bits to store all values of 'A'}}
4545 s -> a2 = x ;
4646 s -> a3 = x ;
4747 s -> a4 = x ;
4848 // expected-warning@-1 {{bit-field 'a4' is not wide enough to store all enumerators of 'A'}}
49- // expected-note@#2 {{widen this field to 2 bits to store all values of 'A'}}
49+ // expected-note@#S_a4_decl {{widen this field to 2 bits to store all values of 'A'}}
5050 s -> a5 = x ;
5151 s -> a6 = x ;
5252 s -> a7 = x ;
5353 // expected-warning@-1 {{bit-field 'a7' is not wide enough to store all enumerators of 'A'}}
54- // expected-note@#3 {{widen this field to 2 bits to store all values of 'A'}}
54+ // expected-note@#S_a7_decl {{widen this field to 2 bits to store all values of 'A'}}
5555 s -> a8 = x ;
5656 // expected-warning@-1 {{signed bit-field 'a8' needs an extra bit to represent the largest positive enumerators of 'A'}}
57- // expected-note@#4 {{consider making the bitfield type unsigned}}
57+ // expected-note@#S_a8_decl {{consider making the bitfield type unsigned}}
5858 s -> a9 = x ;
5959}
6060
@@ -64,18 +64,18 @@ void write_enum_int(struct S *s, int x) {
6464 s -> a3 = x ;
6565 s -> a4 = x ;
6666 // expected-warning@-1 {{bit-field 'a4' is not wide enough to store all enumerators of preferred type 'A'}}
67- // expected-note@#2 {{widen this field to 2 bits to store all values of 'A'}}
68- // expected-note@#preferred_a4 {{preferred type for bitfield 'A' specified here}}
67+ // expected-note@#S_a4_decl {{widen this field to 2 bits to store all values of 'A'}}
68+ // expected-note@#preferred_S_a4 {{preferred type for bitfield 'A' specified here}}
6969 s -> a5 = x ;
7070 s -> a6 = x ;
7171 s -> a7 = x ;
7272 // expected-warning@-1 {{bit-field 'a7' is not wide enough to store all enumerators of preferred type 'A'}}
73- // expected-note@#3 {{widen this field to 2 bits to store all values of 'A'}}
74- // expected-note@#preferred_a7 {{preferred type for bitfield 'A' specified here}}
73+ // expected-note@#S_a7_decl {{widen this field to 2 bits to store all values of 'A'}}
74+ // expected-note@#preferred_S_a7 {{preferred type for bitfield 'A' specified here}}
7575 s -> a8 = x ;
7676 // expected-warning@-1 {{signed bit-field 'a8' needs an extra bit to represent the largest positive enumerators of preferred type 'A'}}
77- // expected-note@#4 {{consider making the bitfield type unsigned}}
78- // expected-note@#preferred_a8 {{preferred type for bitfield 'A' specified here}}
77+ // expected-note@#S_a8_decl {{consider making the bitfield type unsigned}}
78+ // expected-note@#preferred_S_a8 {{preferred type for bitfield 'A' specified here}}
7979 s -> a9 = x ;
8080}
8181
0 commit comments