Unified · Split
| @@ -8085,13 +8085,15 @@ static void decl_initializer_alloc(CType *type, AttributeDef *ad, int r, · 8084 unmodified lines | ||
| 8085 | 8085 | 'cur_text_section' */ |
| 8086 | 8086 | static void gen_function(Sym *sym) |
| 8087 | 8087 | { |
| 8088 | − unsigned char save_bcheck = tcc_state->do_bounds_check; | |
| 8089 | 8088 | /* Initialize VLA state */ |
| 8090 | 8089 | struct scope f = { 0 }; |
| 8091 | 8090 | cur_scope = root_scope = &f; |
| 8091 | +#ifdef CONFIG_TCC_BCHECK | |
| 8092 | + unsigned char save_bcheck = tcc_state->do_bounds_check; | |
| 8092 | 8093 | |
| 8093 | 8094 | if (sym->type.ref->f.no_bcheck) |
| 8094 | 8095 | tcc_state->do_bounds_check = 0; |
| 8096 | +#endif | |
| 8095 | 8097 | |
| 8096 | 8098 | nocode_wanted = 0; |
| 8097 | 8099 | ind = cur_text_section->data_offset; |
| @@ -8145,7 +8147,9 @@ static void gen_function(Sym *sym) · 47 unmodified lines | ||
| 8145 | 8147 | check_vstack(); |
| 8146 | 8148 | /* do this after funcend debug info */ |
| 8147 | 8149 | next(); |
| 8150 | +#ifdef CONFIG_TCC_BCHECK | |
| 8148 | 8151 | tcc_state->do_bounds_check = save_bcheck; |
| 8152 | +#endif | |
| 8149 | 8153 | } |
| 8150 | 8154 | |
| 8151 | 8155 | static void gen_inline_functions(TCCState *s) |