From: Piotr Fusik Date: Thu, 9 Mar 2017 18:14:31 +0000 (+0100) Subject: "static int n; int n;" is an error. X-Git-Tag: V2.16~29^2~3 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d2c89d2ba9d0030c538257a74a5d732cbdca6a0b;p=cc65 "static int n; int n;" is an error. Fixes test/err/static-4.c regression. --- diff --git a/src/cc65/symtab.c b/src/cc65/symtab.c index fdf459873..3275332c5 100644 --- a/src/cc65/symtab.c +++ b/src/cc65/symtab.c @@ -821,7 +821,7 @@ SymEntry* AddGlobalSym (const char* Name, const Type* T, unsigned Flags) } /* An extern declaration must not change the current linkage. */ - if (IsFunc || (Flags & (SC_EXTERN | SC_DEF)) == SC_EXTERN) { + if (IsFunc || (Flags & (SC_EXTERN | SC_STORAGE)) == SC_EXTERN) { Flags &= ~SC_EXTERN; }