diff options
author | H. Peter Anvin (Intel) <hpa@zytor.com> | 2018-12-14 13:01:39 -0800 |
---|---|---|
committer | H. Peter Anvin (Intel) <hpa@zytor.com> | 2018-12-14 13:01:39 -0800 |
commit | 0402a2d40233acdae005b8cad33d502f95da63df (patch) | |
tree | 8bdab9eba8ff40d7a8bc4bf0dd362a2cef414c24 | |
parent | 800c1686880acd74b964de00f58c7a2d8f14eff3 (diff) | |
download | nasm-0402a2d40233acdae005b8cad33d502f95da63df.tar.gz |
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>
-rw-r--r-- | asm/labels.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/asm/labels.c b/asm/labels.c index a3ed0066..20107603 100644 --- a/asm/labels.c +++ b/asm/labels.c @@ -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 * 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, @@ -521,9 +521,10 @@ void define_label(const char *label, int32_t segment, src_set(saved_line, saved_fname); } else if (changed && pass0 > 1 && lptr->defn.type != LBL_SPECIAL) { /* - * WARN_LABEL_LATE defaults to an error, as this should never actually happen. - * Just in case this is a backwards compatibility problem, still make it a - * warning so that the user can suppress or demote it. + * WARN_LABEL_LATE defaults to an error, as this should never + * actually happen. Just in case this is a backwards + * 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 * even during the last pass. |