Date: Sun, 01 Mar 2020 01:38:11 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 235589] sh(1): LINENO is unset in shell arithmetic Message-ID: <bug-235589-227-Rbgmr6WzOg@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-235589-227@https.bugs.freebsd.org/bugzilla/> References: <bug-235589-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235589 Paco Pascal <me@pacopascal.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #212048|0 |1 is obsolete| | --- Comment #5 from Paco Pascal <me@pacopascal.com> --- Created attachment 212062 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=212062&action=edit Perfect LINENO behavior? This patch is the same as the last one I posted, except it asserts that LINENO can't be 0 and LINENO in functions were off by 1. In the previous patch I posted, echo ` echo $LINENO` would output 0. There might be a better method of ensuring this than what I did in parser.c. As far as I can see, this makes LINENO behave in every way it should. The following, echo $LINENO $((LINENO)) $(($LINENO)) PS4='$LINENO+ ' echo `echo $LINENO` eval 'echo $LINENO $((LINENO)) $(($LINENO))' all perform in what I think is expected ways. -- You are receiving this mail because: You are on the CC list for the bug.help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-235589-227-Rbgmr6WzOg>
