1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-25 02:29:52 +00:00

"static int n; int n;" is an error.

Fixes test/err/static-4.c regression.
This commit is contained in:
Piotr Fusik 2017-03-09 19:14:31 +01:00
parent 5988ec37cd
commit d2c89d2ba9

View File

@ -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;
}