diff --git a/Expression.pas b/Expression.pas index 1d0eee0..8d52ea5 100644 --- a/Expression.pas +++ b/Expression.pas @@ -1436,6 +1436,11 @@ if token.kind in startExpression then begin {handle a complex operand} DoOperand + else if token.kind = _Genericsy then begin + Error(144); + Skip; + goto 1; + end else begin {handle a constant operand} new(sp); @@ -3841,7 +3846,7 @@ procedure InitExpression; begin {InitExpression} startTerm := [ident,intconst,uintconst,longconst,ulongconst,doubleconst, - stringconst]; + stringconst,_Genericsy]; startExpression:= startTerm + [lparench,asteriskch,andch,plusch,minusch,excch,tildech,sizeofsy, plusplusop,minusminusop,typedef,_Alignofsy]; diff --git a/Scanner.pas b/Scanner.pas index 691b4b0..08fcc53 100644 --- a/Scanner.pas +++ b/Scanner.pas @@ -665,6 +665,7 @@ if list or (numErr <> 0) then begin 141: msg := @'_Noreturn specifier is only allowed on functions'; 142: msg := @'_Alignas may not be used in this declaration or type name'; 143: msg := @'only object pointer types may be restrict-qualified'; + 144: msg := @'generic selection expressions are not supported by ORCA/C'; otherwise: Error(57); end; {case} writeln(msg^);