mirror of
https://github.com/cc65/cc65.git
synced 2025-01-02 09:34:22 +00:00
Fixed a ca65 internal error that would show a message when a name is exported both outside and inside a scope.
Jeremy Turner described the bug, on the original cc65 mailing list. It was fixed by Ullrich von Bassewitz.
This commit is contained in:
parent
63b5f75a7f
commit
c09c66c372
@ -6,7 +6,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* (C) 1998-2012, Ullrich von Bassewitz */
|
/* (C) 1998-2014, Ullrich von Bassewitz */
|
||||||
/* Roemerstrasse 52 */
|
/* Roemerstrasse 52 */
|
||||||
/* D-70794 Filderstadt */
|
/* D-70794 Filderstadt */
|
||||||
/* EMail: uz@cc65.org */
|
/* EMail: uz@cc65.org */
|
||||||
@ -505,17 +505,7 @@ static void SymCheckUndefined (SymEntry* S)
|
|||||||
"Symbol `%s' is already an import",
|
"Symbol `%s' is already an import",
|
||||||
GetString (Sym->Name));
|
GetString (Sym->Name));
|
||||||
}
|
}
|
||||||
if (Sym->Flags & SF_EXPORT) {
|
if ((Sym->Flags & SF_EXPORT) == 0) {
|
||||||
/* The symbol is already marked as an export. */
|
|
||||||
if (Sym->AddrSize > S->ExportSize) {
|
|
||||||
/* We're exporting a symbol smaller than it actually is */
|
|
||||||
LIWarning (&S->DefLines, 1,
|
|
||||||
"Symbol `%m%p' is %s but exported %s",
|
|
||||||
GetSymName (Sym),
|
|
||||||
AddrSizeToStr (Sym->AddrSize),
|
|
||||||
AddrSizeToStr (S->ExportSize));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
/* Mark the symbol as an export */
|
/* Mark the symbol as an export */
|
||||||
Sym->Flags |= SF_EXPORT;
|
Sym->Flags |= SF_EXPORT;
|
||||||
Sym->ExportSize = S->ExportSize;
|
Sym->ExportSize = S->ExportSize;
|
||||||
@ -525,7 +515,7 @@ static void SymCheckUndefined (SymEntry* S)
|
|||||||
}
|
}
|
||||||
if (Sym->AddrSize > Sym->ExportSize) {
|
if (Sym->AddrSize > Sym->ExportSize) {
|
||||||
/* We're exporting a symbol smaller than it actually is */
|
/* We're exporting a symbol smaller than it actually is */
|
||||||
LIWarning (&S->DefLines, 1,
|
LIWarning (&Sym->DefLines, 1,
|
||||||
"Symbol `%m%p' is %s but exported %s",
|
"Symbol `%m%p' is %s but exported %s",
|
||||||
GetSymName (Sym),
|
GetSymName (Sym),
|
||||||
AddrSizeToStr (Sym->AddrSize),
|
AddrSizeToStr (Sym->AddrSize),
|
||||||
|
Loading…
Reference in New Issue
Block a user