Pelles C forum

Pelles C => Bug reports => Topic started by: Vortex on April 04, 2025, 06:51:44 PM

Title: Macro parameter issue
Post by: Vortex on April 04, 2025, 06:51:44 PM
Hello,

Poasm Version 12.00.1 and Masm can assemble the code below without any issues :

.386
.model flat,stdcall
option casemap:none

enum MACRO p1,p2,p3,p4

p1 EQU 0
p2 EQU 1
p3 EQU 2

   IFNB p4

     p4 EQU 3

   ENDIF

ENDM

.code

start:

   enum false,true,other

   mov eax,other

   ret

END start

Poasm V13.00.1 should accept that there is a missing parameter ( the 4th one ) but it displays the following error message :

error: Invalid use of 'EQU'.
Title: Re: Macro parameter issue
Post by: Pelle on April 06, 2025, 11:52:32 AM
The "IFNB p4" construct is weird in general, and POASM will in this case see "IFNB<nl>" which trough other changes in seen as "true" (i.e. not blank rather than blank). I will fix it...