Ignore storage class when creating enum tag symbols.

This avoids strangeness where an enum tag declared within a typedef declaration would act like a typedef. For example, the following would compile without error:

typedef enum E {a,b,c} T;
E e;
This commit is contained in:
Stephen Heumann 2022-07-18 18:37:26 -05:00
parent 2cbcdc736c
commit c36bf9bf0a

View File

@ -3194,7 +3194,7 @@ while token.kind in allowedTokens do begin
tPtr^.qualifiers := [];
tPtr^.kind := enumType;
variable :=
NewSymbol(ttoken.name, tPtr, storageClass, tagSpace, defined);
NewSymbol(ttoken.name, tPtr, ident, tagSpace, defined);
end {if}
else if token.kind <> lbracech then
Error(9);