c89.c revision 3b427b3ba518f7a7293458c2d3d92eebd8458d87
1/* RUN: clang %s -std=c89 -pedantic -fsyntax-only -verify 2 */ 3void test1() { 4 { 5 int i; 6 i = i + 1; 7 int j; /* expected-warning {{mixing declarations and code}} */ 8 } 9 { 10 __extension__ int i; 11 i = i + 1; 12 int j; /* expected-warning {{mixing declarations and code}} */ 13 } 14 { 15 int i; 16 i = i + 1; 17 __extension__ int j; /* expected-warning {{mixing declarations and code}} */ 18 } 19} 20 21long long test2; /* expected-warning {{extension}} */ 22 23 24void test3(int i) { 25 int A[i]; /* expected-warning {{variable length array}} */ 26} 27 28int test4 = 0LL; /* expected-warning {{long long}} */ 29 30