1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-25 17:29:50 +00:00

Include name of errorneous symbol in error message

git-svn-id: svn://svn.cc65.org/cc65/trunk@1203 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2002-03-24 13:04:24 +00:00
parent 83e73742c8
commit a07e05beb8
2 changed files with 6 additions and 6 deletions

View File

@ -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",

View File

@ -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;