Module Name: src Committed By: kre Date: Sun Dec 17 04:06:03 UTC 2017
Modified Files: src/bin/sh: arith_token.c Log Message: Do a better job of reporting invalid numeric constants in arithmetic exprs. For example, given $(( 08 + 1 )) (or similar) instead of reporting "expecting end of expression" - the generic error for parse failed, which happened as this was parsed as $(( 0 8 + 1 )) because the 8 could not be a part of an octal constant, and that expr makes no sense - instead say "unexpected '8' (out of range) in numeric constant: 08" which makes the cause of the error more obvious. NFC for valid expressions, just the error message (and the way the error is detected). To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/bin/sh/arith_token.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.