Unified · Split
| @@ -113,15 +113,6 @@ static void gv_dup(void); · 112 unmodified lines | |||
| 113 | static int get_temp_local_var(int size,int align); | 113 | static int get_temp_local_var(int size,int align); |
| 114 | static void clear_temp_local_var_list(); | 114 | static void clear_temp_local_var_list(); |
| 115 | 115 | ||
| 116 | static void incr_local_scope(void) | ||
| 117 | { | ||
| 118 | ++local_scope; | ||
| 119 | } | ||
| 120 | |||
| 121 | static void decr_local_scope(void) | ||
| 122 | { | ||
| 123 | --local_scope; | ||
| 124 | } | ||
| 125 | 116 | ||
| 126 | static void reset_local_scope(void) | 117 | static void reset_local_scope(void) |
| 127 | { | 118 | { |
| @@ -6152,11 +6143,11 @@ static void block(int *bsym, int *csym, int is_expr) · 6024 unmodified lines | |||
| 6152 | skip(')'); | 6143 | skip(')'); |
| 6153 | a = gvtst(1, 0); | 6144 | a = gvtst(1, 0); |
| 6154 | b = 0; | 6145 | b = 0; |
| 6155 | incr_local_scope(); | 6146 | ++local_scope; |
| 6156 | saved_nocode_wanted = nocode_wanted; | 6147 | saved_nocode_wanted = nocode_wanted; |
| 6157 | block(&a, &b, 0); | 6148 | block(&a, &b, 0); |
| 6158 | nocode_wanted = saved_nocode_wanted; | 6149 | nocode_wanted = saved_nocode_wanted; |
| 6159 | decr_local_scope(); | 6150 | --local_scope; |
| 6160 | gjmp_addr(d); | 6151 | gjmp_addr(d); |
| 6161 | gsym(a); | 6152 | gsym(a); |
| 6162 | gsym_addr(b, d); | 6153 | gsym_addr(b, d); |
| @@ -6170,8 +6161,8 @@ static void block(int *bsym, int *csym, int is_expr) · 7 unmodified lines | |||
| 6170 | s = local_stack; | 6161 | s = local_stack; |
| 6171 | llabel = local_label_stack; | 6162 | llabel = local_label_stack; |
| 6172 | lcleanup = current_cleanups; | 6163 | lcleanup = current_cleanups; |
| 6173 | incr_local_scope(); | 6164 | ++local_scope; |
| 6174 | 6165 | ||
| 6175 | /* handle local labels declarations */ | 6166 | /* handle local labels declarations */ |
| 6176 | while (tok == TOK_LABEL) { | 6167 | while (tok == TOK_LABEL) { |
| 6177 | next(); | 6168 | next(); |
| @@ -6232,7 +6223,7 @@ static void block(int *bsym, int *csym, int is_expr) · 54 unmodified lines | |||
| 6232 | /* pop locally defined labels */ | 6223 | /* pop locally defined labels */ |
| 6233 | label_pop(&local_label_stack, llabel, is_expr); | 6224 | label_pop(&local_label_stack, llabel, is_expr); |
| 6234 | /* pop locally defined symbols */ | 6225 | /* pop locally defined symbols */ |
| 6235 | decr_local_scope(); | 6226 | --local_scope; |
| 6236 | /* In the is_expr case (a statement expression is finished here), | 6227 | /* In the is_expr case (a statement expression is finished here), |
| 6237 | vtop might refer to symbols on the local_stack. Either via the | 6228 | vtop might refer to symbols on the local_stack. Either via the |
| 6238 | type or via vtop->sym. We can't pop those nor any that in turn | 6229 | type or via vtop->sym. We can't pop those nor any that in turn |
| @@ -6291,7 +6282,7 @@ static void block(int *bsym, int *csym, int is_expr) · 52 unmodified lines | |||
| 6291 | next(); | 6282 | next(); |
| 6292 | skip('('); | 6283 | skip('('); |
| 6293 | s = local_stack; | 6284 | s = local_stack; |
| 6294 | incr_local_scope(); | 6285 | ++local_scope; |
| 6295 | if (tok != ';') { | 6286 | if (tok != ';') { |
| 6296 | /* c99 for-loop init decl? */ | 6287 | /* c99 for-loop init decl? */ |
| 6297 | if (!decl0(VT_LOCAL, 1, NULL)) { | 6288 | if (!decl0(VT_LOCAL, 1, NULL)) { |
| @@ -6327,7 +6318,7 @@ static void block(int *bsym, int *csym, int is_expr) · 29 unmodified lines | |||
| 6327 | gjmp_addr(c); | 6318 | gjmp_addr(c); |
| 6328 | gsym(a); | 6319 | gsym(a); |
| 6329 | gsym_addr(b, c); | 6320 | gsym_addr(b, c); |
| 6330 | decr_local_scope(); | 6321 | --local_scope; |
| 6331 | sym_pop(&local_stack, s, 0); | 6322 | sym_pop(&local_stack, s, 0); |
| 6332 | 6323 | ||
| 6333 | } else | 6324 | } else |