Fix tags being silently ignored in anonymous enums

This commit is contained in:
Daniel_Cortez 2019-09-30 19:01:34 +07:00
parent 2f642899f1
commit 013084e181

View File

@ -2968,7 +2968,7 @@ static void decl_enum(int vclass,int fstatic)
lexpush();
break;
} /* if */
idxtag=pc_addtag(NULL); /* optional explicit item tag */
idxtag=(enumname[0]=='\0') ? tag : pc_addtag(NULL); /* optional explicit item tag */
if (needtoken(tSYMBOL)) { /* read in (new) token */
tokeninfo(&val,&str); /* get the information */
strcpy(constname,str); /* save symbol name */