summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Crayne <chuck@thor.crayne.org>2008-03-26 17:20:21 -0700
committerCharles Crayne <chuck@thor.crayne.org>2008-03-26 17:20:21 -0700
commit5a7976c925e494bfd0db806c5f5724157236b4e3 (patch)
tree5736b49fe49e4e17681e5d9c62a62b6b88244116
parentbd45c46cb9e26fe42c449a2b702c3c960df84417 (diff)
downloadnasm-5a7976c925e494bfd0db806c5f5724157236b4e3.tar.gz
nasm-5a7976c925e494bfd0db806c5f5724157236b4e3.tar.bz2
nasm-5a7976c925e494bfd0db806c5f5724157236b4e3.zip
Restore critical expression checking when optimizer enabled
In the prior code, enabling optimization effectively diabled critical expression checking, because the optimization passes took place before checking was enabled.
-rw-r--r--parser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/parser.c b/parser.c
index 6e6a052..5983af5 100644
--- a/parser.c
+++ b/parser.c
@@ -323,7 +323,8 @@ restart_parse:
result->opcode == I_RESD || result->opcode == I_RESQ ||
result->opcode == I_REST || result->opcode == I_RESO ||
result->opcode == I_EQU || result->opcode == I_INCBIN) {
- critical = pass0;
+ critical = (pass0 < 2 ? 1 : 2);
+
} else
critical = (pass == 2 ? 2 : 0);