From 013084e18113d50bb5a9642b41b417dbf07babd9 Mon Sep 17 00:00:00 2001 From: Daniel_Cortez Date: Mon, 30 Sep 2019 19:01:34 +0700 Subject: [PATCH] Fix tags being silently ignored in anonymous enums --- source/compiler/sc1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/compiler/sc1.c b/source/compiler/sc1.c index d6f9a21..a05b643 100644 --- a/source/compiler/sc1.c +++ b/source/compiler/sc1.c @@ -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 */