[Bug 218943] /bin/sh regression? with doubly negated numbers

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Apr 29 14:18:35 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218943

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

What POSIX intends exactly may not be fully clear (see discussion on the Austin
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 -- and ++
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.

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


More information about the freebsd-bugs mailing list