we're consciously trying to write C90 compatible code, hence no mixed declaration and code.
Unified · Split
| @@ -870,10 +870,10 @@ static int prepare_dynamic_rel(TCCState *s1, Section *sr) · 869 unmodified lines | |||
| 870 | 870 | ||
| 871 | count = 0; | 871 | count = 0; |
| 872 | for_each_elem(sr, 0, rel, ElfW_Rel) { | 872 | for_each_elem(sr, 0, rel, ElfW_Rel) { |
| 873 | type = ELFW(R_TYPE)(rel->r_info); | ||
| 874 | #if defined(TCC_TARGET_I386) || defined(TCC_TARGET_X86_64) | 873 | #if defined(TCC_TARGET_I386) || defined(TCC_TARGET_X86_64) |
| 875 | int sym_index = ELFW(R_SYM)(rel->r_info); | 874 | int sym_index = ELFW(R_SYM)(rel->r_info); |
| 876 | #endif | 875 | #endif |
| 876 | type = ELFW(R_TYPE)(rel->r_info); | ||
| 877 | switch(type) { | 877 | switch(type) { |
| 878 | #if defined(TCC_TARGET_I386) || defined(TCC_TARGET_X86_64) | 878 | #if defined(TCC_TARGET_I386) || defined(TCC_TARGET_X86_64) |
| 879 | #if defined(TCC_TARGET_I386) | 879 | #if defined(TCC_TARGET_I386) |