From a07e05beb872fc75ab0ce8290e0e98c7849aa23e Mon Sep 17 00:00:00 2001 From: cuz Date: Sun, 24 Mar 2002 13:04:24 +0000 Subject: [PATCH] Include name of errorneous symbol in error message git-svn-id: svn://svn.cc65.org/cc65/trunk@1203 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/ca65/error.c | 2 +- src/ca65/symtab.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ca65/error.c b/src/ca65/error.c index 98f585ef3..849e5eb5f 100644 --- a/src/ca65/error.c +++ b/src/ca65/error.c @@ -178,7 +178,7 @@ void ErrorMsg (const FilePos* Pos, unsigned ErrNum, va_list ap) "Too many macro parameters", "Macro parameter expected", "Circular reference in symbol definition", - "Symbol redeclaration mismatch", + "Symbol `%s' redeclaration mismatch", "Alignment value must be a power of 2", "Duplicate `.ELSE'", "Conditional assembly branch was never closed", diff --git a/src/ca65/symtab.c b/src/ca65/symtab.c index c54445fae..91e994298 100644 --- a/src/ca65/symtab.c +++ b/src/ca65/symtab.c @@ -498,7 +498,7 @@ void SymImport (const char* Name, int ZP) */ if (S->Flags & SF_GLOBAL) { if ((ZP != 0) != ((S->Flags & SF_ZP) != 0)) { - Error (ERR_SYM_REDECL_MISMATCH); + Error (ERR_SYM_REDECL_MISMATCH, Name); } S->Flags &= ~SF_GLOBAL; } @@ -536,7 +536,7 @@ void SymExport (const char* Name, int ZP) */ if (S->Flags & SF_GLOBAL) { if ((ZP != 0) != ((S->Flags & SF_ZP) != 0)) { - Error (ERR_SYM_REDECL_MISMATCH); + Error (ERR_SYM_REDECL_MISMATCH, Name); } S->Flags &= ~SF_GLOBAL; } @@ -570,7 +570,7 @@ void SymGlobal (const char* Name, int ZP) * size of the definition, then bail out. */ if (S->Flags & SF_IMPORT || S->Flags & SF_EXPORT) { if ((ZP != 0) != ((S->Flags & SF_ZP) != 0)) { - Error (ERR_SYM_REDECL_MISMATCH); + Error (ERR_SYM_REDECL_MISMATCH, Name); } return; } @@ -620,7 +620,7 @@ void SymConDes (const char* Name, unsigned Type, unsigned Prio) /* Check if the symbol was not already defined as ZP symbol */ if ((S->Flags & SF_ZP) != 0) { - Error (ERR_SYM_REDECL_MISMATCH); + Error (ERR_SYM_REDECL_MISMATCH, Name); } /* If the symbol was already declared as a condes, check if the new @@ -628,7 +628,7 @@ void SymConDes (const char* Name, unsigned Type, unsigned Prio) */ if (S->ConDesPrio[Type] != CD_PRIO_NONE) { if (S->ConDesPrio[Type] != Prio) { - Error (ERR_SYM_REDECL_MISMATCH); + Error (ERR_SYM_REDECL_MISMATCH, Name); } } S->ConDesPrio[Type] = Prio; -- 2.39.5