On Thu, Jun 05, 2008 at 10:07:51AM +0200, Andreas Schwab wrote: > Stephane Chazelas <[EMAIL PROTECTED]> writes: > > > I suspect this: > > $ sh -c 'function() { echo a; }; function' > > sh: -c: line 0: syntax error near unexpected token `(' > > sh: -c: line 0: `function() { echo a; }; function' > > > > breaks POSIX conformance, BTW (but then it's the same for AT&T > > ksh, pdksh, zsh). > > POSIX allows function to be treated as a reserved word, even if it does > not attach any meaning to it. [...]
You're right. Shame on me, I had said the exact same thing (that POSIX allowed "function" to be a keyword) less than 1 week ago in a bug report to posh (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=483860#20). Looks like my skull is getting more and more porous... Sorry about that. Stéphane