[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: macro expansion
From: |
Stepan Kasal |
Subject: |
Re: macro expansion |
Date: |
Fri, 20 Feb 2004 08:12:28 +0100 |
User-agent: |
Mutt/1.4.1i |
Hello,
On Thu, Feb 19, 2004 at 10:23:35AM -0500, Anupama Lath wrote:
> WrIregNops( venMfunc_8, `0x'eval( KLENGTH_9|(72-1), 16 ) )
> ^ ^
>
> which do not get evaluated by the GNU m4 1.4 unless the spaces
> are removed. Looks like this is the syntax imposed by GNU m4.
> Is there any chance of this limitation being changed ?
I would guess that this is a bug in m4 1.4.
It seems to be fixed in the current CVS version.
(You can check it from savannah.gnu.org, if you have automake and
autoconf, and if you can take the risk.)
The only space causing problems is the space _after_ the second
parameter to `eval'. You can workaround the problem this way:
define(KLENGTH_9, 8 )
define(`orig_eval', defn(`eval'))
define(`eval', `orig_eval($1,orig_eval($2))')
WrIregNops( venMfunc_8, `0x'eval( KLENGTH_9|(72-1), 16 ) )
The code could be simpler, if you use "m4 -P" to process the files:
m4_dnl use m4 -P
m4_define(KLENGTH_9, 8 )
m4_define(`eval', `m4_eval($1,m4_eval($2))')
WrIregNops( venMfunc_8, `0x'eval( KLENGTH_9|(72-1), 16 ) )
PS: despite what the obsolete m4 docs say, the right list for
m4 bug reports is address@hidden
HTH,
Stepan Kasal
- macro expansion, Anupama Lath, 2004/02/19
- Re: macro expansion,
Stepan Kasal <=