Re: [PATCH] unset/null variables should expand to 0 during arithmetic expansion

2017-02-01 Thread Michael Greenberg
Hi Martijn, > On Jan 29, 2017, at 4:13 PM, Martijn Dekker wrote: > > Op 19-01-17 om 21:06 schreef Michael Greenberg: >> unset x ; echo $((x+=2)) >> >> Running bash on this program echoes the number 2 to standard out and sets x >> to 2. Running dash (git HEAD/release 0.5.9.1)

[PATCH] unset/null variables should expand to 0 during arithmetic expansion

2017-01-19 Thread Michael Greenberg
Hi, It seems like dash has a subtly incorrect arithmetic expansion for variables that are unset. For example, consider the following program: unset x ; echo $((x+=2)) Running bash on this program echoes the number 2 to standard out and sets x to 2. Running dash (git HEAD/release 0.5.9.1)