mirror of
https://github.com/cc65/cc65.git
synced 2025-01-11 11:30:13 +00:00
Improved error messages on struct/union type multiple definitions.
This commit is contained in:
parent
fe3f726fd6
commit
b62b1650f5
@ -761,7 +761,11 @@ SymEntry* AddStructSym (const char* Name, unsigned Flags, unsigned Size, SymTabl
|
|||||||
Entry = 0;
|
Entry = 0;
|
||||||
} else if ((Entry->Flags & Flags & SC_DEF) == SC_DEF) {
|
} else if ((Entry->Flags & Flags & SC_DEF) == SC_DEF) {
|
||||||
/* Both structs are definitions. */
|
/* Both structs are definitions. */
|
||||||
Error ("Multiple definition for '%s'", Name);
|
if (Type == SC_STRUCT) {
|
||||||
|
Error ("Multiple definition for 'struct %s'", Name);
|
||||||
|
} else {
|
||||||
|
Error ("Multiple definition for 'union %s'", Name);
|
||||||
|
}
|
||||||
Entry = 0;
|
Entry = 0;
|
||||||
} else {
|
} else {
|
||||||
/* Define the struct size if it is a definition */
|
/* Define the struct size if it is a definition */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user