Author Topic: another problem with joining macro parameters  (Read 16848 times)

Zdenek Sojka

  • Guest
another problem with joining macro parameters
« on: May 03, 2009, 02:27:21 PM »
Hello,

now that http://sourceforge.net/forum/forum.php?thread_id=3046555&forum_id=167168 is solved, another problem arised with revision d784a083a3f1bc37f6a90cb12ccbcbc2cef570bb (preproc: unify token-pasting code)

The following doesn't compile anymore:
===============
F11:
.dest

MAIN:

%macro FJMP 1
jmp F %+ %1 %+ 1.dest
%endmacro

FJMP 1
===============
Results in:
tst2.asm:10: error: expression syntax error
Removing .dest from the jump results in:
tst2.asm:10: error: symbol `F' undefined

As in the former case, I am not sure if this is a bug or I am trying to bend the preprocessor too much...

Thanks for your assistance!
Zdenek Sojka

nasm64developer

  • Guest
Re: another problem with joining macro parameters
« Reply #1 on: May 04, 2009, 05:17:47 AM »
I can confirm that

jmp F %+ %1 %+ 1.dest

used to work as of a few changes ago, but now
no longer does. Please file a bug report.

In the meantime, you can use

jmp F%{1}1.dest

as a workaround -- that is, there is no real need
for %+ in this particular code.

Zdenek Sojka

  • Guest
Re: another problem with joining macro parameters
« Reply #2 on: May 04, 2009, 04:38:57 PM »
Thank you, reported.

Zdenek Sojka