On 2015-06-04 14:41 -0600, Eric Blake wrote:
> On 06/04/2015 02:17 PM, Nick Bowler wrote:
> > Do these problematic shells properly handle:
> > 
> >   for arg
> >   do
> >     ...
> >   done
> > 
> > when $# is 0?
> 
> Yes; all shells do.

OK, good to know.

[...]
> it's not the expand-to-nothing that is a problem, it is the actual
> omission:
> 
> $ /bin/sh -c 'for a in ; do :; done'
> /bin/sh: syntax error at line 1: `;' unexpected
> $ /bin/sh -c 'for a in $nothing; do :; done'
> $

Right, I see that now in the doc patch you posted.  So in Autoconf this
might turn up if you generate the list with m4, but is highly unlikely
to be an issue for "pure" shell code.

Thanks,
-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)

Reply via email to