bug-m4
[Top][All Lists]
Advanced

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

Re: Example code bug


From: Eric Blake
Subject: Re: Example code bug
Date: Sat, 16 Aug 2014 08:35:32 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0

On 08/16/2014 08:20 AM, Florian Mayer wrote:
> Hello m4 team,

[rearranging your mail a bit]

> 
> I hope that it is an actual bug this time...

Not a bug per se, since, as you point out...

> 
> I am aware of the existence of forloop2, which is listed in the example
> code
> directory, but I like this function for it's simplicity.

...the manual is trying to point out that the simple version is not
robust, and your example is proof of that.  However, looking at your
proposed patch:

existing:
> define(`_forloop', `$4'`ifelse($1, `$3', `', `define(`$1',
> incr($1))$0($@)')')

proposed:
> define(`_forloop', `$4'``''`ifelse($1, `$3', `', `define(`$1',
> incr($1))$0($@)')')

you are merely adding an empty quote to separate $4 from ifelse.  Which
seems simple enough to do.  I'll turn it into a formal patch soon enough.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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