mirror of
https://github.com/cc65/cc65.git
synced 2025-01-11 11:30:13 +00:00
Stopped extern declarations from changing previous static, but otherwise identical, declarations.
This commit is contained in:
parent
d36f31dcff
commit
4e9842ef33
@ -813,6 +813,11 @@ 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) {
|
||||
Flags &= ~SC_EXTERN;
|
||||
}
|
||||
|
||||
/* Add the new flags */
|
||||
Entry->Flags |= Flags;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user