From: Eric Blake Date: Sat, 18 Oct 2008 13:27:45 +0000 (-0600) Subject: Document bugs in { } handling. X-Git-Tag: v2.63b~231 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af61badc821bcef780650da9032adbc4d86d1db5;p=thirdparty%2Fautoconf.git Document bugs in { } handling. * doc/autoconf.texi (Limitations of Builtins): Mention bug on empty list. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index d971b188..25c8826a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-10-18 Eric Blake + Document bugs in { } handling. + * doc/autoconf.texi (Limitations of Builtins): Mention bug on + empty list. + Fix some testsuite failures introduced two days ago. * tests/m4sh.at (Nested AS@&t@_REQUIRE_SHELL_FN) (AS@&t@_REQUIRE_SHELL_FN and m4@&t@_require): Adjust to changed diff --git a/doc/autoconf.texi b/doc/autoconf.texi index a6bcb341..eed40c56 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -14624,6 +14624,22 @@ bash: line 1: /bad: Permission denied 1 @end example +Posix requires a syntax error if a brace list has no contents. However, +not all shells obey this rule; and on shells where empty lists are +permitted, the effect on @samp{$?} is inconsistent. To avoid problems, +ensure that a brace list is never empty. + +@example +$ @kbd{bash -c 'false; @{ @}; echo $?' || echo $?} +bash: line 1: syntax error near unexpected token `@}' +bash: line 1: `false; @{ @}; echo $?' +2 +$ @kbd{zsh -c 'false; @{ @}; echo $?' || echo $?} +1 +$ @kbd{pdksh -c 'false; @{ @}; echo $?' || echo $?} +0 +@end example + @item @command{break} @c ------------------