scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit a13c8cf6f4209b766a9491c57179647762756c19
parent 2d30362df693b46f67f1515e9d23e56e237410a5
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 10 Apr 2014 07:30:29 +0200

Small type changes

struct node is deprecated, use Node. Put the register word
is funny, so use it.

Diffstat:
Mexpr.c | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/expr.c b/expr.c @@ -195,7 +195,7 @@ error: static Node * postfix(void) { - Node *np1, *np2; + register Node *np1, *np2; np1 = primary(); for (;;) { @@ -219,7 +219,7 @@ postfix(void) static Node * unary(void) { - Node *np; + register Node *np; switch (yytoken) { case INC: case DEC: @@ -231,11 +231,11 @@ unary(void) } } -static struct node * +static Node * cast(void) { Type *tp; - Node *np1, *np2; + register Node *np1, *np2; extern Type *typename(void); if (yytoken == '(') { @@ -256,7 +256,7 @@ cast(void) return unary(); } -static struct node * +static Node * mul(void) { register Node *np; @@ -275,7 +275,7 @@ mul(void) } } -static struct node * +static Node * add(void) { register char op;