From b6898c3f1ead7d40702cdd697a421b89ae355efa Mon Sep 17 00:00:00 2001 From: cuz Date: Sun, 24 Nov 2002 21:07:39 +0000 Subject: [PATCH] Check register before static git-svn-id: svn://svn.cc65.org/cc65/trunk@1624 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/cc65/expr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cc65/expr.c b/src/cc65/expr.c index 692ba4d55..aacc96891 100644 --- a/src/cc65/expr.c +++ b/src/cc65/expr.c @@ -938,6 +938,11 @@ static int primary (ExprDesc* lval) lval->Flags = E_MLOCAL | E_TLOFFS; lval->ConstVal = Sym->V.Offs; } + } else if ((Sym->Flags & SC_REGISTER) == SC_REGISTER) { + /* Register variable, zero page based */ + lval->Flags = E_MGLOBAL | E_MCONST | E_TREGISTER; + lval->Name = Sym->V.Offs; + lval->ConstVal = 0; } else if ((Sym->Flags & SC_STATIC) == SC_STATIC) { /* Static variable */ if (Sym->Flags & (SC_EXTERN | SC_STORAGE)) { @@ -948,11 +953,6 @@ static int primary (ExprDesc* lval) lval->Name = Sym->V.Label; } lval->ConstVal = 0; - } else if ((Sym->Flags & SC_REGISTER) == SC_REGISTER) { - /* Register variable, zero page based */ - lval->Flags = E_MGLOBAL | E_MCONST | E_TREGISTER; - lval->Name = Sym->V.Offs; - lval->ConstVal = 0; } else { /* Local static variable */ lval->Flags = E_MGLOBAL | E_MCONST | E_TLLAB; -- 2.39.5