mirror of
https://github.com/cc65/cc65.git
synced 2025-01-12 17:30:50 +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) {
|
if (CurTok.Tok == TOK_ASSIGN) {
|
||||||
|
|
||||||
/* This is a definition */
|
/* This is a definition */
|
||||||
|
if (SymIsDef (Entry)) {
|
||||||
|
Error ("Global variable `%s' has already been defined",
|
||||||
|
Entry->Name);
|
||||||
|
}
|
||||||
Entry->Flags |= SC_DEF;
|
Entry->Flags |= SC_DEF;
|
||||||
|
|
||||||
/* We cannot initialize types of unknown size, or
|
/* We cannot initialize types of unknown size, or
|
||||||
|
Loading…
x
Reference in New Issue
Block a user