Add tests for the fixes made in commits 76cb1144ef91924c53c57ea71e6f67ce73ce1cc6, a465b7f58fdea15caa1bfb81ff5e985c94c4df4a, 0f522fb32a635dafce30f3ce3ff2cb15bcec809e, 82969f045c99b4d1ef833de35117c17b326b46c0 and 673befd2d7745a90c1c4fcb6d2f0e266c04f8c97.
Unified · Split
| @@ -0,0 +1,9 @@ | |||
| 1 | int f(void) | ||
| 2 | { | ||
| 3 | return 0; | ||
| 4 | } | ||
| 5 | |||
| 6 | int f(void) | ||
| 7 | { | ||
| 8 | return 1; | ||
| 9 | } | ||
| @@ -0,0 +1 @@ | |||
| 1 | 58_function_redefinition.c:7: error: redefinition of 'f' | ||
| @@ -0,0 +1 @@ | |||
| 1 | int (*fct)[42](int x); | ||
| @@ -0,0 +1 @@ | |||
| 1 | 59_function_array.c:1: error: declaration of an array of functions | ||
| @@ -0,0 +1,4 @@ | |||
| 1 | enum color {RED, GREEN, BLUE}; | ||
| 2 | enum color {R, G, B}; | ||
| 3 | |||
| 4 | enum color c; | ||
| @@ -0,0 +1 @@ | |||
| 1 | 60_enum_redefinition.c:2: error: struct/union/enum already defined | ||
| @@ -0,0 +1 @@ | |||
| 1 | enum rgb c = 42; | ||
| @@ -0,0 +1 @@ | |||
| 1 | 61_undefined_enum.c:1: error: unknown struct/union/enum | ||
| @@ -0,0 +1,4 @@ | |||
| 1 | enum color {RED, GREEN, BLUE}; | ||
| 2 | enum rgb {RED, G, B}; | ||
| 3 | |||
| 4 | enum color c = RED; | ||
| @@ -0,0 +1 @@ | |||
| 1 | 62_enumerator_redefinition.c:2: error: redefinition of enumerator 'RED' | ||
| @@ -69,7 +69,12 @@ TESTS = \ · 68 unmodified lines | |||
| 69 | 54_goto.test \ | 69 | 54_goto.test \ |
| 70 | 55_lshift_type.test \ | 70 | 55_lshift_type.test \ |
| 71 | 56_btype_excess-1.test \ | 71 | 56_btype_excess-1.test \ |
| 72 | 57_btype_excess-2.test | 72 | 57_btype_excess-2.test \ |
| 73 | 58_function_redefinition.test \ | ||
| 74 | 59_function_array.test \ | ||
| 75 | 60_enum_redefinition.test \ | ||
| 76 | 61_undefined_enum.test \ | ||
| 77 | 62_enumerator_redefinition.test | ||
| 73 | 78 | ||
| 74 | # 30_hanoi.test -- seg fault in the code, gcc as well | 79 | # 30_hanoi.test -- seg fault in the code, gcc as well |
| 75 | # 34_array_assignment.test -- array assignment is not in C standard | 80 | # 34_array_assignment.test -- array assignment is not in C standard |