public
/
FUZIX.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
294715c
)
sym: allow auto variables to be assigned expressions
author
Alan Cox
<alan@linux.intel.com>
Thu, 16 Nov 2017 23:22:10 +0000
(23:22 +0000)
committer
Alan Cox
<alan@linux.intel.com>
Thu, 16 Nov 2017 23:22:10 +0000
(23:22 +0000)
Nice trivial change. Fixing statics is a different ball game alas.
Applications/SmallC/sym.c
patch
|
blob
|
history
diff --git
a/Applications/SmallC/sym.c
b/Applications/SmallC/sym.c
index
50744aa
..
9b896a6
100644
(file)
--- a/
Applications/SmallC/sym.c
+++ b/
Applications/SmallC/sym.c
@@
-292,7
+292,12
@@
void declare_local(int typ, int stclass, int otag) {
break;
}
}
- stkp = gen_defer_modify_stack(stkp - k);
+ if (match("=")) {
+ gen_modify_stack(stkp);
+ expression(0);
+ gen_push(0);
+ } else
+ stkp = gen_defer_modify_stack(stkp - k);
add_local(sname, j, typ, stkp, AUTO);
break;
}