1 /* we are testing a C99 feature */ 2 #pragma std_c99 3 4 /* we do not care about unreferenced variables */ 5 #pragma disable_warning 85 6 7 #ifdef TEST1 8 #pragma std_c89 test(void)9void test(void) 10 { 11 int a = 0; 12 a++; 13 int b; 14 } /* ERROR */ /* declaration after statement within this block */ 15 #endif 16 17 #ifdef TEST2 test(void)18void test(void) 19 { 20 int a = 0; 21 a++; 22 int b; 23 } 24 #endif 25 26 #ifdef TEST3 test(void)27void test(void) 28 { 29 int a = 0; /* ERROR */ /* previously defined here */ 30 a++; 31 int a; /* ERROR */ /* duplicate symbol */ 32 } 33 #endif 34 35 #ifdef TEST4 test(void)36void test(void) 37 { 38 int a = 0; 39 a++; 40 int b; 41 { 42 int a; 43 } 44 } 45 #endif 46