1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-15 02:29:32 +00:00

Fixed garbage enum tag name appeared in diagnostic messages if the enum tag declaration failed.

This commit is contained in:
acqn 2022-11-02 23:58:18 +08:00
parent ad7c5a6617
commit 9b39c3f949

View File

@ -1419,9 +1419,8 @@ static void ParseTypeSpec (DeclSpec* D, long Default, TypeCode Qualifiers,
} else {
if (CurTok.Tok != TOK_LCURLY) {
Error ("Identifier expected");
} else {
AnonName (Ident, "enum");
}
AnonName (Ident, "enum");
}
/* Remember we have an extra type decl */
D->Flags |= DS_EXTRA_TYPE;