History

Fix attribute patch for windows

herman ten brugge committed 6 years ago

Commit c740fa21 parent 50fe33f1 file · +5 −1Browse files

Unified · Split

tccgen.c+5−1
@@ -8085,13 +8085,15 @@ static void decl_initializer_alloc(CType *type, AttributeDef *ad, int r, · 8084 unmodified lines
80858085 'cur_text_section' */
80868086 static void gen_function(Sym *sym)
80878087 {
8088− unsigned char save_bcheck = tcc_state->do_bounds_check;
80898088 /* Initialize VLA state */
80908089 struct scope f = { 0 };
80918090 cur_scope = root_scope = &f;
8091+#ifdef CONFIG_TCC_BCHECK
8092+ unsigned char save_bcheck = tcc_state->do_bounds_check;
80928093
80938094 if (sym->type.ref->f.no_bcheck)
80948095 tcc_state->do_bounds_check = 0;
8096+#endif
80958097
80968098 nocode_wanted = 0;
80978099 ind = cur_text_section->data_offset;
@@ -8145,7 +8147,9 @@ static void gen_function(Sym *sym) · 47 unmodified lines
81458147 check_vstack();
81468148 /* do this after funcend debug info */
81478149 next();
8150+#ifdef CONFIG_TCC_BCHECK
81488151 tcc_state->do_bounds_check = save_bcheck;
8152+#endif
81498153 }
81508154
81518155 static void gen_inline_functions(TCCState *s)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t