Report an error if a type name is missing in a _Generic expression.

This commit is contained in:
Stephen Heumann 2021-03-09 17:45:49 -06:00
parent 8fd091e119
commit 4381b97f86
1 changed files with 5 additions and 0 deletions

View File

@ -1914,6 +1914,11 @@ var
NextToken;
typesMatch := false;
if token.kind <> defaultsy then begin
if not (token.kind in specifierQualifierListElement) then begin
Error(26);
while not (token.kind in [colonch,commach,rparench,eofsy]) do
NextToken;
end; {if}
TypeName; {get the type name}
currentType := typeSpec;
if (currentType^.size = 0) or (currentType^.kind = functionType) then