mirror of
https://github.com/cc65/cc65.git
synced 2024-12-27 00:29:31 +00:00
omit an error message also when an unresolved import was added by the compiler. fixes bug #1551
This commit is contained in:
parent
1dae5062e9
commit
36315ecc06
@ -776,14 +776,20 @@ static void PrintUnresolved (ExpCheckFunc F, void* Data)
|
||||
Import* Imp = E->ImpList;
|
||||
const char* name = GetString (E->Name);
|
||||
while (Imp) {
|
||||
unsigned J;
|
||||
for (J = 0; J < CollCount (&Imp->RefLines); ++J) {
|
||||
const LineInfo* LI = CollConstAt (&Imp->RefLines, J);
|
||||
fprintf (stderr,
|
||||
"%s:%u: Error: Unresolved external '%s'\n",
|
||||
GetSourceName (LI),
|
||||
GetSourceLine (LI),
|
||||
name);
|
||||
unsigned J, count = CollCount (&Imp->RefLines);
|
||||
/* The count is 0 when the import was not added by an input file,
|
||||
but by the compiler itself. */
|
||||
if (count == 0) {
|
||||
fprintf (stderr, "Error: Unresolved external '%s'\n", name);
|
||||
} else {
|
||||
for (J = 0; J < count; ++J) {
|
||||
const LineInfo* LI = CollConstAt (&Imp->RefLines, J);
|
||||
fprintf (stderr,
|
||||
"%s:%u: Error: Unresolved external '%s'\n",
|
||||
GetSourceName (LI),
|
||||
GetSourceLine (LI),
|
||||
name);
|
||||
}
|
||||
}
|
||||
Imp = Imp->Next;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user