0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-07-24 10:25:42 -04:00

labels.c: redefine test should be passn, not pass0

Stupid thinko: lpass should be passn + 1, not pass0 + 1.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin (Intel) 2018-12-14 13:01:39 -08:00
parent 800c168688
commit 0402a2d402

View File

@ -442,7 +442,7 @@ void define_label(const char *label, int32_t segment,
* The backend may invoke this before pass 1, so treat that as * The backend may invoke this before pass 1, so treat that as
* a special "pass". * a special "pass".
*/ */
const int64_t lpass = pass0 + 1; const int64_t lpass = passn + 1;
/* /*
* Phase errors here can be one of two types: a new label appears, * Phase errors here can be one of two types: a new label appears,
@ -521,9 +521,10 @@ void define_label(const char *label, int32_t segment,
src_set(saved_line, saved_fname); src_set(saved_line, saved_fname);
} else if (changed && pass0 > 1 && lptr->defn.type != LBL_SPECIAL) { } else if (changed && pass0 > 1 && lptr->defn.type != LBL_SPECIAL) {
/* /*
* WARN_LABEL_LATE defaults to an error, as this should never actually happen. * WARN_LABEL_LATE defaults to an error, as this should never
* Just in case this is a backwards compatibility problem, still make it a * actually happen. Just in case this is a backwards
* warning so that the user can suppress or demote it. * compatibility problem, still make it a warning so that the
* user can suppress or demote it.
* *
* As a special case, LBL_SPECIAL symbols are allowed to be changed * As a special case, LBL_SPECIAL symbols are allowed to be changed
* even during the last pass. * even during the last pass.