Skip to content

Commit

Permalink
Issue 8696 - Compiler reports incorrect dangling else with version at…
Browse files Browse the repository at this point in the history
…tributes
  • Loading branch information
Iain Buclaw committed Sep 19, 2012
1 parent 842eeee commit dc2aa06
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,10 +605,15 @@ Dsymbols *Parser::parseDeclDefs(int once)

Lcondition:
{
Loc lookingForElseSave = lookingForElse;
lookingForElse = loc;
a = parseBlock();
lookingForElse = lookingForElseSave;
if (token.value == TOKcolon)
a = parseBlock();
else
{
Loc lookingForElseSave = lookingForElse;
lookingForElse = loc;
a = parseBlock();
lookingForElse = lookingForElseSave;
}
}
aelse = NULL;
if (token.value == TOKelse)
Expand Down

0 comments on commit dc2aa06

Please sign in to comment.