[Nasm-bugs] [Bug 3392833] New: if/else has no branches trigger when using empty %1 via fn()

noreply-nasm at dev.nasm.us noreply-nasm at dev.nasm.us
Mon Mar 6 14:54:21 PST 2023


https://bugzilla.nasm.us/show_bug.cgi?id=3392833

            Bug ID: 3392833
           Summary: if/else has no branches trigger when using empty %1
                    via fn()
           Product: NASM
           Version: 2.16.xx
          Hardware: PC
                OS: Linux
            Status: OPEN
          Severity: major
          Priority: Medium
         Component: Documentation
          Assignee: nobody at nasm.us
          Reporter: mikar_gibbros at yahoo.com
                CC: chang.seok.bae at intel.com, gorcunov at gmail.com,
                    hpa at zytor.com, nasm-bugs at nasm.us
     Obtained from: From OS distribution

%macro exit 1
  %if 0 = 1
    %fatal got here 1
  %elif %1 = 0
    %fatal got here 2
  %else
    %fatal got here 3
  %endif
  %fatal got here 4 ; should be unreachable
%endmacro
exit() ; 1 empty argument -> fatal 4, none of the the ifs nor else trigger.


With the above code, exit(1) gives fatal 3.
If you comment out "%elif %1 = 0" and "%fatal got here 2" then exit() and
exit(1) both give fatal 3.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.


More information about the Nasm-bugs mailing list