]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
docs: Posix now says "((cat))" isn't portable
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 26 Oct 2010 23:12:46 +0000 (16:12 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 26 Oct 2010 23:13:34 +0000 (16:13 -0700)
* doc/autoconf.texi (Parenthesis): Update documentation to reflect
what Posix 1003.1-2008 says about "((".

ChangeLog
doc/autoconf.texi

index 34b3be42ec5d306292f6e36c63fd6a71ec13d843..6f9e4c9030786899884bde93bec37fb7e9b71ab7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-10-26  Paul Eggert  <eggert@cs.ucla.edu>
+
+       docs: Posix now says "((cat))" isn't portable
+       * doc/autoconf.texi (Parenthesis): Update documentation to reflect
+       what Posix 1003.1-2008 says about "((".
+
 2010-10-20  Eric Blake  <eblake@redhat.com>
 
        docs: document dash bug in <>
index adbdded902194fe94f4508c01788cf4f6e7cb94c..4af8663174b62ce0e706208ffcb6558dafc62fdd 100644 (file)
@@ -16046,12 +16046,15 @@ for the rationale.
 @cindex Shell parentheses
 
 Beware of two opening parentheses in a row, as many shell
-implementations treat them specially.  Posix requires that the command
-@samp{((cat))} must behave like @samp{(cat)}, but many shells, including
+implementations treat them specially, and Posix says that a portable
+script cannot use @samp{((} outside the @samp{$((} form used for shell
+arithmetic.  In traditional shells, @samp{((cat))} behaves like
+@samp{(cat)}; but many shells, including
 Bash and the Korn shell, treat @samp{((cat))} as an arithmetic
 expression equivalent to @samp{let "cat"}, and may or may not report an
 error when they detect that @samp{cat} is not a number.  As another
-example, @samp{pdksh} 5.2.14 misparses the following code:
+example, @samp{pdksh} 5.2.14 does not treat the following code
+as a traditional shell would:
 
 @example
 if ((true) || false); then