2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
2009-12-10 16:54:47 +08:00
|
|
|
// PR5515
|
|
|
|
|
|
|
|
extern int a[];
|
|
|
|
int a[10];
|
|
|
|
extern int b[10];
|
|
|
|
int b[];
|
|
|
|
extern int c[1];
|
|
|
|
int c[] = {1,2}; // expected-error {{excess elements in array initializer}}
|
2012-07-08 07:00:31 +08:00
|
|
|
|
|
|
|
int d[1][]; // expected-error {{array has incomplete element type 'int []'}}
|
2012-12-13 09:43:21 +08:00
|
|
|
|
|
|
|
extern const int e[2]; // expected-note {{previous definition is here}}
|
|
|
|
int e[] = { 1 }; // expected-error {{redefinition of 'e' with a different type: 'int []' vs 'const int [2]'}}
|