Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Apr 2017 20:44:25 +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@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 218943
           Summary: /bin/sh regression? with doubly negated numbers
           Product: Base System
           Version: 11.0-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: z7dr6ut7gs@snkmail.com

/bin/sh has changed behavior on handling doubly (or more) negated numbers:

sh -c 'var=3D--123; echo $(($var))'

Under FreeBSD 9 and earlier, it "works":

123


Under 10 & 11:

sh: arithmetic expression: expecting primary: "--123"

I'm trying to find the posix stance on this.  Please add a note here if you
know where posix would weigh in on that kind of arithmetic expression.

--=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>