From 4381b97f863dd82b9dddf6be77e2a9ab183c8507 Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Tue, 9 Mar 2021 17:45:49 -0600 Subject: [PATCH] Report an error if a type name is missing in a _Generic expression. --- Expression.pas | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Expression.pas b/Expression.pas index 7e8cc2e..84d889f 100644 --- a/Expression.pas +++ b/Expression.pas @@ -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