From: cuz Date: Wed, 12 May 2004 08:51:58 +0000 (+0000) Subject: Better error messages X-Git-Tag: V2.12.0~805 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b58b62c77e13c7a563c424939f777c3739574323;p=cc65 Better error messages git-svn-id: svn://svn.cc65.org/cc65/trunk@3025 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/ld65/exports.c b/src/ld65/exports.c index d1eb20df3..87caa5e56 100644 --- a/src/ld65/exports.c +++ b/src/ld65/exports.c @@ -554,21 +554,33 @@ static void CheckSymType (const Export* E) while (Imp) { if (E->AddrSize != Imp->AddrSize) { /* 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) { /* User defined export */ - Warning ("Address size mismatch for `%s', export in " - "%s(%lu), import in %s(%lu)", + Warning ("Address size mismatch for `%s': Exported from %s, " + "%s(%lu) as `%s', import in %s, %s(%lu) as `%s'", GetString (E->Name), + ExpObjName, GetSourceFileName (E->Obj, E->Pos.Name), E->Pos.Line, + ExpAddrSize, + ImpObjName, GetSourceFileName (Imp->Obj, Imp->Pos.Name), - Imp->Pos.Line); + Imp->Pos.Line, + ImpAddrSize); } else { /* 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), + ExpAddrSize, + ImpObjName, GetSourceFileName (Imp->Obj, Imp->Pos.Name), - Imp->Pos.Line); + Imp->Pos.Line, + ImpAddrSize); } } Imp = Imp->Next;