Improved error messages on struct/union type multiple definitions.
This commit is contained in:
parent
fe3f726fd6
commit
b62b1650f5
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue