From b58b62c77e13c7a563c424939f777c3739574323 Mon Sep 17 00:00:00 2001 From: cuz Date: Wed, 12 May 2004 08:51:58 +0000 Subject: [PATCH] Better error messages git-svn-id: svn://svn.cc65.org/cc65/trunk@3025 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/ld65/exports.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) 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; -- 2.39.5