From: cuz Date: Sun, 21 Dec 2003 18:54:39 +0000 (+0000) Subject: Fixed a weird bug. Some special where found to be register variables when they X-Git-Tag: V2.12.0~996 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=72fe2c86a108af8055905c7c3fe7c66a67548075;p=cc65 Fixed a weird bug. Some special where found to be register variables when they weren't. Caused by the assignments of the type flags. The flags for the symbol table entry should get reassigned, because this is not the first time they caused a problem, but this requires more thought, so I hacked the function that tests for register vars. git-svn-id: svn://svn.cc65.org/cc65/trunk@2813 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/cc65/symentry.h b/src/cc65/symentry.h index b1f864703..530fc9ce1 100644 --- a/src/cc65/symentry.h +++ b/src/cc65/symentry.h @@ -189,11 +189,12 @@ INLINE int SymIsRef (const SymEntry* Sym) #if defined(HAVE_INLINE) INLINE int SymIsRegVar (const SymEntry* Sym) /* Return true if the given entry is a register variable */ +/* ### HACK! Fix the ugly type flags! */ { - return ((Sym->Flags & SC_REGISTER) == SC_REGISTER); + return ((Sym->Flags & (SC_REGISTER|SC_TYPE)) == SC_REGISTER); } #else -# define SymIsRegVar(Sym) (((Sym)->Flags & SC_REGISTER) == SC_REGISTER) +# define SymIsRegVar(Sym) (((Sym)->Flags & (SC_REGISTER|SC_TYPE)) == SC_REGISTER) #endif void CvtRegVarToAuto (SymEntry* Sym);