mirror of
https://github.com/cc65/cc65.git
synced 2024-11-19 06:31:31 +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 */
|
/* Add the new flags */
|
||||||
Entry->Flags |= Flags;
|
Entry->Flags |= Flags;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user