[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: m4_for bug?

From: Ralf Wildenhues
Subject: Re: m4_for bug?
Date: Tue, 31 Oct 2006 15:22:48 +0100
User-agent: Mutt/1.5.13 (2006-10-09)

Hello Eric,

* Eric Blake wrote on Tue, Oct 31, 2006 at 03:11:32PM CET:
> Based on the documentation, I expected
> m4_for([i], [1], [5000], [[a]])
> to be identical to
> m4_for([i], [1], [5000], [], [[a]])
> with both forms printing 5000 a's.

Are you sure?  The documentation states
| -- Macro: m4_for (VAR, FIRST, LAST, [STEP], EXPRESSION)

| -- Macro: m4_for (VAR, FIRST, LAST, [STEP,] EXPRESSION)

and I don't think Autoconf uses constructs like that.
I do see though that the documentation is usually inprecise
in that it writes


instead of


but I'm not sure whether fixing that would help anybody (and
I don't know off-hand how to fix it easily).

OTOH, I do think that an m4_for that has an empty 5th argument
should not magically do the wrong thing, which really rules out 
that the comma following the optional STEP may be dropped.
Let's remember that macros that depend on $# are mostly evil.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]