scc

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

commit 675adafd7148e7fdcc413759648e2bb45d795109
parent ac904dae0efce5a0fd81709566dd25d22d79291f
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri,  5 Jul 2013 12:29:54 +0200

Change the name of variable in newiden

sns was a confusing name, and yyns is better because it shows that
is the namespace of the yyval symbol.

Diffstat:
Mdecl.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/decl.c b/decl.c @@ -16,16 +16,16 @@ static void declarator(struct ctype *tp); static void newiden(struct ctype *tp) { - register unsigned char sns, ns; + register unsigned char yyns, ns; ns = tp->c_typedef ? NS_TYPEDEF : NS_IDEN; - sns = yyval.sym->ns; + yyns = yyval.sym->ns; - if (sns == NS_ANY) { /* First appearence of the symbol */ + if (yyns == NS_ANY) { /* First appearence of the symbol */ yyval.sym->ns = ns; cursym = yyval.sym; return; - } else if (ns == sns) { /* Duplicated symbol */ + } else if (ns == yyns) { /* Duplicated symbol */ if (yyval.sym->ctx == curctx) error("redeclaration of '%s'", yytext); }