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
1 changed files with 5 additions and 2 deletions

View File

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