Improved error messages on struct/union type multiple definitions.
This commit is contained in:
@@ -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 */
|
||||||
|
|||||||
Reference in New Issue
Block a user