Skip to content

Commit

Permalink
4374 - Required do-while ending semicolon
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Sep 10, 2011
1 parent b60b44f commit 1db1635
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/mars.c
Expand Up @@ -92,7 +92,7 @@ Global::Global()
"\nMSIL back-end (alpha release) by Cristian L. Vlasceanu and associates.";
#endif
;
version = "v2.055";
version = "v2.056";
global.structalign = 8;

memset(&params, 0, sizeof(Param));
Expand Down
4 changes: 4 additions & 0 deletions src/parse.c
Expand Up @@ -3678,6 +3678,10 @@ Statement *Parser::parseStatement(int flags)
check(TOKlparen);
condition = parseExpression();
check(TOKrparen);
if (token.value == TOKsemicolon)
nextToken();
else if (!global.params.useDeprecated)
error("do-while statement requires terminating ;");
s = new DoStatement(loc, body, condition);
break;
}
Expand Down

0 comments on commit 1db1635

Please sign in to comment.