"static int n; int n;" is an error.
Fixes test/err/static-4.c regression.
This commit is contained in:
@@ -821,7 +821,7 @@ SymEntry* AddGlobalSym (const char* Name, const Type* T, unsigned Flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* An extern declaration must not change the current linkage. */
|
/* 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;
|
Flags &= ~SC_EXTERN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user