mirror of
https://github.com/cc65/cc65.git
synced 2024-12-23 19:29:37 +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;
|
||||
} else if ((Entry->Flags & Flags & SC_DEF) == SC_DEF) {
|
||||
/* 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;
|
||||
} else {
|
||||
/* Define the struct size if it is a definition */
|
||||
|
Loading…
Reference in New Issue
Block a user