mirror of
https://github.com/cc65/cc65.git
synced 2024-12-24 11:31:31 +00:00
Issue an error for duplicate global variables.
Previously it was an assembler error.
This commit is contained in:
parent
730d01a25f
commit
31f19fbc65
@ -188,6 +188,10 @@ static void Parse (void)
|
||||
if (CurTok.Tok == TOK_ASSIGN) {
|
||||
|
||||
/* This is a definition */
|
||||
if (SymIsDef (Entry)) {
|
||||
Error ("Global variable `%s' has already been defined",
|
||||
Entry->Name);
|
||||
}
|
||||
Entry->Flags |= SC_DEF;
|
||||
|
||||
/* We cannot initialize types of unknown size, or
|
||||
|
Loading…
Reference in New Issue
Block a user