Skip to content

Commit

Permalink
fix Issue 14009 - iasm parser accepts incorrect AsmExp
Browse files Browse the repository at this point in the history
  • Loading branch information
9rnsr committed Jan 19, 2015
1 parent 12fbc44 commit 5dc11b2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/iasm.c
Expand Up @@ -3720,7 +3720,6 @@ static OPND *asm_cond_exp()
{
asm_token();
o2 = asm_cond_exp();
asm_token();
asm_chktok(TOKcolon,"colon");
o3 = asm_cond_exp();
o1 = (o1->disp) ? o2 : o3;
Expand Down
14 changes: 14 additions & 0 deletions test/fail_compilation/fail14009.d
@@ -0,0 +1,14 @@
/*
TEST_OUTPUT:
---
fail_compilation/fail14009.d(12): Error: end of instruction expected, not ':'
---
*/

void main()
{
asm {
mov EAX, FS: 1 ? 2 : 3; // accepted
mov EAX, FS: 1 ? 2 : : 3; // rejected
}
}

0 comments on commit 5dc11b2

Please sign in to comment.