[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Use of double parentheses
From: |
Paul Eggert |
Subject: |
Re: Use of double parentheses |
Date: |
Mon, 01 Aug 2011 08:13:54 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11 |
On 08/01/11 05:23, Eric Blake wrote:
>> && ( (unset $as_var) || exit 1)>/dev/null 2>&1&& unset $as_var || :
>> done
>>
>>
>> Wouldn't it mean that all '((' present in the "configure" script, and
>> related to shell commands, should be rewritten to '( ('?
>
> It's not a bug in pdksh - POSIX was recently reworded to allow (( to
> introduce arithmetic parsing on any shell that wants to provide it as an
> extension.
I just now looked at POSIX.1-2008, and can't see where it says that.
First, only '$((' is special; '((' without a preceding '$' is not special
<http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_03>.
So if pdksh 5.2.4 mishandles the above, then it does appear to be a bug.
Second, arithmetic parsing is required now; it's not optional
<http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_04>.