Add another test for PR36157.

llvm-svn: 325998
This commit is contained in:
Richard Smith 2018-02-24 00:00:58 +00:00
parent e8f1ffb50a
commit b7a9bedfcd
1 changed files with 8 additions and 0 deletions

View File

@ -68,3 +68,11 @@ void pr23151(int (*p1)[*]) // expected-error {{variable length array must be bou
int TransformBug(int a) {
return sizeof(*(int(*)[({ goto v; v: a;})]) 0); // expected-warning {{use of GNU statement expression extension}}
}
// PR36157
struct {
int a[ // expected-error {{variable length array in struct}}
implicitly_declared() // expected-warning {{implicit declaration}}
];
};
int (*use_implicitly_declared)() = implicitly_declared; // ok, was implicitly declared at file scope