test$ cat test1.asm %ifdef __?NASM_IFDIRECTIVE?__ %ifdirective %note %note foo %endif %endif test$ cat test2.asm %macro bar 0 %ifdirective %note %note foo %endif %endmacro %ifdef __?NASM_IFDIRECTIVE?__ bar %endif test$ cat test3.asm %ifdef __?NASM_IFDIRECTIVE?__ %if %isdirective(%note) %note foo %endif %endif test$ nasm -v NASM version 2.16.02rc2 compiled on Oct 12 2023 test$ nasm test1.asm -l /dev/stderr test1.asm:6: error: `%endif': no matching `%if' test$ nasm test2.asm -l /dev/stderr 1 %macro bar 0 2 %ifdirective %note 3 %note foo 4 %endif 5 %endmacro 6 7 %ifdef __?NASM_IFDIRECTIVE?__ 8 bar 9 %endif test$ nasm test3.asm -l /dev/stderr 1 2 %ifdef __?NASM_IFDIRECTIVE?__ 3 %if %isdirective(%note) 4 %note foo 5 %endif 6 %endif test$ ~/proj/nasmtest/broken/nasm -v NASM version 3.00rc3 compiled on Sep 9 2025 test$ ~/proj/nasmtest/broken/nasm test1.asm -l /dev/stderr 1 2 %ifdef __?NASM_IFDIRECTIVE?__ 3 %ifdirective %note 4 %note foo 4 ------------------ note: foo 5 %endif 6 %endif test$ ~/proj/nasmtest/broken/nasm test2.asm -l /dev/stderr 1 %macro bar 0 2 %ifdirective %note 3 %note foo 4 %endif 5 %endmacro 6 7 %ifdef __?NASM_IFDIRECTIVE?__ 8 bar 2 <1> %ifdirective %note 3 <1> %note foo 3 ------------------ <1> note: foo 4 <1> %endif 9 %endif test$ ~/proj/nasmtest/broken/nasm test3.asm -l /dev/stderr 1 2 %ifdef __?NASM_IFDIRECTIVE?__ 3 %if %isdirective(%note) 4 %note foo 4 ------------------ note: foo 5 %endif 6 %endif test$