File tree 1 file changed +8
-10
lines changed
1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -117,13 +117,11 @@ int somefunc(int i) {
117
117
struct ArrayStruct {
118
118
char n [1 ];
119
119
};
120
- struct AA {
121
- char name2 [(int )& ((struct ArrayStruct * )0 )-> n - 1 ]; // expected-warning {{folded to constant array}} \
122
- // pedantic-expected-warning {{folded to constant array}} \
123
- // ref-error {{array size is negative}} \
124
- // pedantic-ref-error {{array size is negative}}
125
- };
126
- _Static_assert (sizeof (struct AA ) == 15 , "" ); // ref-error {{failed}} \
127
- // ref-note {{ == 15}} \
128
- // pedantic-ref-error {{failed}} \
129
- // pedantic-ref-note {{ == 15}}
120
+ char name2 [(int )& ((struct ArrayStruct * )0 )-> n ]; // expected-warning {{folded to constant array}} \
121
+ // pedantic-expected-warning {{folded to constant array}} \
122
+ // ref-warning {{folded to constant array}} \
123
+ // pedantic-ref-warning {{folded to constant array}}
124
+ _Static_assert (sizeof (name2 ) == 0 , "" ); // expected-error {{failed}} \
125
+ // expected-note {{evaluates to}} \
126
+ // pedantic-expected-error {{failed}} \
127
+ // pedantic-expected-note {{evaluates to}}
You can’t perform that action at this time.
0 commit comments