array-declared-as-incorrect-type.c revision ea285162342df160e7860e26528bc7110bc6c0cd
1// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s 2 3extern int a1[]; 4int a1[1]; 5 6extern int a2[]; // expected-note {{previous definition is here}} 7float a2[1]; // expected-error {{redefinition of 'a2'}} 8 9extern int a3[][2]; 10int a3[1][2]; 11 12extern int a4[][2]; // expected-note {{previous definition is here}} 13int a4[2]; // expected-error {{redefinition of 'a4'}} 14 15extern int a5[1][2][3]; // expected-note {{previous definition is here}} 16int a5[3][2][1]; // expected-error {{redefinition of 'a5'}} 17