Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Apr 2017 14:18:34 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 218943] /bin/sh regression? with doubly negated numbers
Message-ID:  <bug-218943-8-xs9tZ6P0QK@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-218943-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-218943-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D218943

--- Comment #1 from Jilles Tjoelker <jilles@FreeBSD.org> ---
The behaviour indeed changed, deliberately.

What POSIX intends exactly may not be fully clear (see discussion on the Au=
stin
Group mailing list in March 2017), but it states that -- and ++ need not be
supported. That is, they may be supported and $((--a)) may decrement a and
expand to the decremented value.

In order to avoid ambiguity, I changed sh such that it recognizes the -- an=
d ++
tokens (following C's "maximal munch" rule) and reject them.

If you want two minus signs in sequence, separate them with a space or use
parentheses.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-218943-8-xs9tZ6P0QK>