autoconf-patches
[Top][All Lists]
Advanced

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

Re: testsuite: 62 63 221 223 224 376 failed


From: Eric Blake
Subject: Re: testsuite: 62 63 221 223 224 376 failed
Date: Sat, 18 Oct 2008 07:29:13 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.17) Gecko/20080914 Thunderbird/2.0.0.17 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[moving to patches list]

According to Ralf Wildenhues on 10/18/2008 2:44 AM:
> The issue in the m4sh scripts is that the ':' contents end up outside
> the function definition.  I'm sure you'll have that fixed in a blink of
> an eye.  ;-)

Hmm.  This exposes a bug in several shells.  According to POSIX [1], a
function body (and for that matter, any use of a brace list) must cause a
syntax error if there is no list within the braces.  However, while bash
and Solaris /bin/sh get it right, ash, zsh, and pdksh fail.  I'm
committing this:

[1]
http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_10_02

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkj55KkACgkQ84KuGfSFAYAAeQCgthqby2YXQxI8xQP7i4Dwdu+j
MUIAn1RuMtTjA0l8zfPpqbxYhPFMnLdz
=5Qmk
-----END PGP SIGNATURE-----
>From af61badc821bcef780650da9032adbc4d86d1db5 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Sat, 18 Oct 2008 07:27:45 -0600
Subject: [PATCH] Document bugs in { } handling.

* doc/autoconf.texi (Limitations of Builtins): Mention bug on
empty list.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog         |    4 ++++
 doc/autoconf.texi |   16 ++++++++++++++++
 2 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d971b18..25c8826 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2008-10-18  Eric Blake  <address@hidden>
 
+       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@&address@hidden)
        (AS@&address@hidden and m4@&address@hidden): Adjust to changed
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index a6bcb34..eed40c5 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -14624,6 +14624,22 @@ Limitations of Builtins
 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.
+
address@hidden
+$ @kbd{bash -c 'false; @{ @}; echo $?' || echo $?}
+bash: line 1: syntax error near unexpected token address@hidden'
+bash: line 1: `false; @{ @}; echo $?'
+2
+$ @kbd{zsh -c 'false; @{ @}; echo $?' || echo $?}
+1
+$ @kbd{pdksh -c 'false; @{ @}; echo $?' || echo $?}
+0
address@hidden example
+
 
 @item @command{break}
 @c ------------------
-- 
1.6.0.2


reply via email to

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