Require a declarator after comma in declarations.

This gives an error for code like "int x,;".
This commit is contained in:
Stephen Heumann 2022-11-07 20:00:23 -06:00
parent de57170ef8
commit 202ed3b514

View File

@ -3738,8 +3738,11 @@ variable := nil;
Declarator(declSpecifiers, variable, variableSpace, doingPrototypes); Declarator(declSpecifiers, variable, variableSpace, doingPrototypes);
if variable = nil then begin if variable = nil then begin
inhibitHeader := false; inhibitHeader := false;
if token.kind = semicolonch then if token.kind = semicolonch then begin
NextToken if not first then
Error(176);
NextToken;
end {if}
else begin else begin
Error(22); Error(22);
SkipStatement; SkipStatement;