[Nasm-bugs] [Bug 3392612] New: %exitrep exits *after* the current rep
noreply-nasm at gorcunov.org
noreply-nasm at gorcunov.org
Tue Sep 24 00:12:37 PDT 2019
https://bugzilla.nasm.us/show_bug.cgi?id=3392612
Bug ID: 3392612
Summary: %exitrep exits *after* the current rep
Product: NASM
Version: 2.14.xx
Hardware: All
OS: All
Status: OPEN
Severity: normal
Priority: Medium
Component: Assembler
Assignee: nobody at nasm.us
Reporter: jadoxa at yahoo.com.au
CC: chang.seok.bae at intel.com, gorcunov at gmail.com,
hpa at zytor.com, nasm-bugs at nasm.us
Obtained from: Binary from nasm.us
Exiting a macro repeat still executes the current loop.
> type tst.nsm
%macro testrep 0.nolist
%assign i 1
%rep 4
%if i==3
%exitrep
%endif
%warning i
%assign i i+1
%endrep
%endmacro
testrep
> nasm -e tst.nsm
%line 11+1 tst.nsm
tst.nsm:12: warning: (testrep:7) 1 [-w+user]
tst.nsm:12: warning: (testrep:7) 2 [-w+user]
tst.nsm:12: warning: (testrep:7) 3 [-w+user]
"3" should not be output, as that occurs after the exit. I believe this can be
fixed by making "in_progress = 0" in the PP_EXITREP case.
--
You are receiving this mail because:
You are watching all bug changes.
You are on the CC list for the bug.
More information about the Nasm-bugs
mailing list