]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Document bugs in { } handling.
authorEric Blake <ebb9@byu.net>
Sat, 18 Oct 2008 13:27:45 +0000 (07:27 -0600)
committerEric Blake <ebb9@byu.net>
Sat, 18 Oct 2008 13:27:45 +0000 (07:27 -0600)
* doc/autoconf.texi (Limitations of Builtins): Mention bug on
empty list.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
doc/autoconf.texi

index d971b1886f55b610f6ad261b5356d3e628f29c4a..25c8826adaecd872a97f9abbf764ae3439f74bc2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2008-10-18  Eric Blake  <ebb9@byu.net>
 
+       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
index a6bcb34124faaa9b997b9dd3b68fcf8c672280ce..eed40c56ab478df34154ac8e380376b9f9c461bb 100644 (file)
@@ -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 ------------------