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(); lexpush();
break; break;
} /* if */ } /* 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 */ if (needtoken(tSYMBOL)) { /* read in (new) token */
tokeninfo(&val,&str); /* get the information */ tokeninfo(&val,&str); /* get the information */
strcpy(constname,str); /* save symbol name */ strcpy(constname,str); /* save symbol name */