Better error messages
git-svn-id: svn://svn.cc65.org/cc65/trunk@3025 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -554,21 +554,33 @@ static void CheckSymType (const Export* E)
|
|||||||
while (Imp) {
|
while (Imp) {
|
||||||
if (E->AddrSize != Imp->AddrSize) {
|
if (E->AddrSize != Imp->AddrSize) {
|
||||||
/* Export is ZP, import is abs or the other way round */
|
/* Export is ZP, import is abs or the other way round */
|
||||||
|
const char* ExpAddrSize = AddrSizeToStr (E->AddrSize);
|
||||||
|
const char* ImpAddrSize = AddrSizeToStr (Imp->AddrSize);
|
||||||
|
const char* ExpObjName = GetObjFileName (E->Obj);
|
||||||
|
const char* ImpObjName = GetObjFileName (Imp->Obj);
|
||||||
if (E->Obj) {
|
if (E->Obj) {
|
||||||
/* User defined export */
|
/* User defined export */
|
||||||
Warning ("Address size mismatch for `%s', export in "
|
Warning ("Address size mismatch for `%s': Exported from %s, "
|
||||||
"%s(%lu), import in %s(%lu)",
|
"%s(%lu) as `%s', import in %s, %s(%lu) as `%s'",
|
||||||
GetString (E->Name),
|
GetString (E->Name),
|
||||||
|
ExpObjName,
|
||||||
GetSourceFileName (E->Obj, E->Pos.Name),
|
GetSourceFileName (E->Obj, E->Pos.Name),
|
||||||
E->Pos.Line,
|
E->Pos.Line,
|
||||||
|
ExpAddrSize,
|
||||||
|
ImpObjName,
|
||||||
GetSourceFileName (Imp->Obj, Imp->Pos.Name),
|
GetSourceFileName (Imp->Obj, Imp->Pos.Name),
|
||||||
Imp->Pos.Line);
|
Imp->Pos.Line,
|
||||||
|
ImpAddrSize);
|
||||||
} else {
|
} else {
|
||||||
/* Export created by the linker */
|
/* Export created by the linker */
|
||||||
Warning ("Address size mismatch for `%s', imported from %s(%lu)",
|
Warning ("Address size mismatch for `%s': Symbol is `%s'"
|
||||||
|
", but imported from %s, %s(%lu) as `%s'",
|
||||||
GetString (E->Name),
|
GetString (E->Name),
|
||||||
|
ExpAddrSize,
|
||||||
|
ImpObjName,
|
||||||
GetSourceFileName (Imp->Obj, Imp->Pos.Name),
|
GetSourceFileName (Imp->Obj, Imp->Pos.Name),
|
||||||
Imp->Pos.Line);
|
Imp->Pos.Line,
|
||||||
|
ImpAddrSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Imp = Imp->Next;
|
Imp = Imp->Next;
|
||||||
|
|||||||
Reference in New Issue
Block a user