mirror of
https://github.com/cc65/cc65.git
synced 2025-08-08 22:25:28 +00:00
Merge pull request #2245 from acqn/MinorFix
[cc65] Avoided unnecessary BSS name duplication for tentative global variables
This commit is contained in:
@@ -285,11 +285,14 @@ static void Parse (void)
|
|||||||
*/
|
*/
|
||||||
const char* bssName = GetSegName (SEG_BSS);
|
const char* bssName = GetSegName (SEG_BSS);
|
||||||
|
|
||||||
if (Sym->V.BssName && strcmp (Sym->V.BssName, bssName) != 0) {
|
if (Sym->V.BssName != 0) {
|
||||||
Error ("Global variable '%s' already was defined in the '%s' segment.",
|
if (strcmp (Sym->V.BssName, bssName) != 0) {
|
||||||
Sym->Name, Sym->V.BssName);
|
Error ("Global variable '%s' already was defined in the '%s' segment",
|
||||||
|
Sym->Name, Sym->V.BssName);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Sym->V.BssName = xstrdup (bssName);
|
||||||
}
|
}
|
||||||
Sym->V.BssName = xstrdup (bssName);
|
|
||||||
|
|
||||||
/* This is to make the automatical zeropage setting of the symbol
|
/* This is to make the automatical zeropage setting of the symbol
|
||||||
** work right.
|
** work right.
|
||||||
|
Reference in New Issue
Block a user