Bug#445651: posh: Conditional operator evaluates both arguments

2007-10-12 Thread Clint Adams
On Fri, Oct 12, 2007 at 11:30:11PM +0800, Herbert Xu wrote: Either it should assign in both cases or neither. As far as POSIX is concerned, it defers to ISO C on this. The semantics in ISO C is quite clear, that is, the assignment should not occur. Sounds convincing to me. I think there's

Bug#445651: posh: Conditional operator evaluates both arguments

2007-10-12 Thread Clint Adams
On Mon, Oct 08, 2007 at 08:35:42AM +0800, Herbert Xu wrote: Yes. Based on the contents of tests/arith.t, I'm wondering if this is somehow intentional. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]

Bug#445651: posh: Conditional operator evaluates both arguments

2007-10-12 Thread Herbert Xu
On Fri, Oct 12, 2007 at 10:45:14AM -0400, Clint Adams wrote: On Mon, Oct 08, 2007 at 08:35:42AM +0800, Herbert Xu wrote: Yes. Based on the contents of tests/arith.t, I'm wondering if this is somehow intentional. I've tested every other shell and they all disagree with posh, except pdksh :)

Bug#445651: posh: Conditional operator evaluates both arguments

2007-10-07 Thread herbert
Package: posh Version: 0.5.7 Severity: normal I'm in the process of implementing assignment/conditional operator support in dash. I noticed that posh/pdksh has an anomaly with the conditional operator in that both arguments seem to be evaluated. POSIX defers to ISO C on this which forbids the

Bug#445651: posh: Conditional operator evaluates both arguments

2007-10-07 Thread Clint Adams
On Sun, Oct 07, 2007 at 11:21:31PM +0800, [EMAIL PROTECTED] wrote: I'm in the process of implementing assignment/conditional operator support in dash. I noticed that posh/pdksh has an anomaly with the conditional operator in that both arguments seem to be evaluated. POSIX defers to ISO C on

Bug#445651: posh: Conditional operator evaluates both arguments

2007-10-07 Thread Herbert Xu
On Sun, Oct 07, 2007 at 12:32:08PM -0400, Clint Adams wrote: Putting brackets around x = 3 seems to fix it so this could be a parse error. Parentheses, I assume. Yes. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED] Home Page: