History

partially revert e23194a

see http://lists.nongnu.org/archive/html/tinycc-devel/2011-03/msg00002.html

Joe Soroka committed 15 years ago

Commit 7fc2eee1 parent b3a8eed2 files · +3 −20Browse files

Unified · Split

2 files
  1. tcc.h +0 −1
  2. tccgen.c +3 −19
tcc.h+0−1
@@ -1094,7 +1094,6 @@ ST_FUNC void gexpr(void); · 1093 unmodified lines
10941094 ST_FUNC int expr_const(void);
10951095 ST_FUNC void gen_inline_functions(void);
10961096 ST_FUNC void decl(int l);
1097−ST_FUNC void for_loop_init();
10981097 #if defined CONFIG_TCC_BCHECK || defined TCC_TARGET_C67
10991098 ST_FUNC Sym *get_sym_ref(CType *type, Section *sec, unsigned long offset, unsigned long size);
11001099 #endif
tccgen.c+3−19
@@ -4379,7 +4379,8 @@ static void block(int *bsym, int *csym, int *case_sym, int *def_sym, · 4378 unmodified lines
43794379 next();
43804380 skip('(');
43814381 if (tok != ';') {
4382− for_loop_init();
4382+ gexpr();
4383+ vpop();
43834384 }
43844385 skip(';');
43854386 d = ind;
@@ -5405,7 +5406,7 @@ ST_FUNC void gen_inline_functions(void) · 1019 unmodified lines
54055406 }
54065407
54075408 /* 'l' is VT_LOCAL or VT_CONST to define default storage type */
5408−static void decl0(int l, int is_for_loop_init)
5409+ST_FUNC void decl(int l)
54095410 {
54105411 int v, has_init, r;
54115412 CType type, btype;
@@ -5414,11 +5415,6 @@ static void decl0(int l, int is_for_loop_init) · 2 unmodified lines
54145415
54155416 while (1) {
54165417 if (!parse_btype(&btype, &ad)) {
5417− if (is_for_loop_init) {
5418− gexpr();
5419− vpop();
5420− return;
5421− }
54225418 /* skip redundant ';' */
54235419 /* XXX: find more elegant solution */
54245420 if (tok == ';') {
@@ -5633,8 +5629,6 @@ static void decl0(int l, int is_for_loop_init) · 208 unmodified lines
56335629 }
56345630 }
56355631 if (tok != ',') {
5636− if (is_for_loop_init)
5637− return;
56385632 skip(';');
56395633 break;
56405634 }
@@ -5643,13 +5637,3 @@ static void decl0(int l, int is_for_loop_init) · 2 unmodified lines
56435637 }
56445638 }
56455639 }
5646−
5647−ST_FUNC void for_loop_init(void)
5648−{
5649− decl0(VT_LOCAL, 1);
5650−}
5651−
5652−ST_FUNC void decl(int l)
5653−{
5654− decl0(l, 0);
5655−}

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