mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-09-27 03:54:30 +00:00
Give a basic error message for use of _Generic.
This commit is contained in:
parent
dd92585116
commit
6e89dc5883
@ -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];
|
||||
|
@ -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^);
|
||||
|
Loading…
Reference in New Issue
Block a user