History log of /freebsd-head/bin/sh/arith_yylex.c
Revision Date Author Comments
bdbf8ff3c037e3ea0af749f43843000f2a9a88ed 10-Feb-2019 jilles <jilles@FreeBSD.org> sh: Restore $((x)) error checking after fix for $((-9223372036854775808))

SVN r342880 was designed to fix $((-9223372036854775808)) and things like
$((0x8000000000000000)) but also broke error detection for values of
variables without dollar sign ($((x))).

For compatibility, overflow in plain literals continues to be ignored and
the value is clamped to the boundary (except 9223372036854775808 which is
changed to -9223372036854775808).

Reviewed by: se (although he would like error checking to be removed)
MFC after: 2 weeks
X-MFC-with: r342880
Differential Revision: https://reviews.freebsd.org/D18926
00d578928eca75be320b36d37543a7e2a4f9fbdb 27-May-2016 grehan <grehan@FreeBSD.org> Create branch for bhyve graphics import.
bbd4d38fcaeebd7eda1dfb2906d1cd019f93e8b6 01-Mar-2015 jilles <jilles@FreeBSD.org> sh: Fix compiler warnings related to duplicate or missing declarations.
eb1a5f8de9f7ea602c373a710f531abbf81141c4 21-Feb-2014 gjb <gjb@FreeBSD.org> Move ^/user/gjb/hacking/release-embedded up one directory, and remove
^/user/gjb/hacking since this is likely to be merged to head/ soon.

Sponsored by: The FreeBSD Foundation
6b01bbf146ab195243a8e7d43bb11f8835c76af8 27-Dec-2013 gjb <gjb@FreeBSD.org> Copy head@r259933 -> user/gjb/hacking/release-embedded for initial
inclusion of (at least) arm builds with the release.

Sponsored by: The FreeBSD Foundation
f53205fcfa3664184b4a8f18b12f4911f2a948d3 24-Aug-2013 jilles <jilles@FreeBSD.org> sh: Reject ++ and -- in arithmetic.

POSIX does not require ++ and -- in arithmetic. It is probably more useful
to reject them than to treat ++x and --x as x silently.

Note that the behaviour of increment and decrement can be obtained via
(x+=1), ((x+=1)-1), (x-=1) and ((x-=1)+1).

PR: bin/176444
11c560ec5e9b4b4c1e625e3f949adc3e5f025826 25-Jan-2012 charnier <charnier@FreeBSD.org> Add prototypes, ANSIfy functions definitions to reduce WARNS=6 output.
0d4be9304a1029fb089294ffbc0318df9f57e528 07-Mar-2011 stefanf <stefanf@FreeBSD.org> Remove unnecessary cast.

Reviewed by: jilles
1a2c2ccf00d839e96bbb9cb391027b14ec4e0d05 05-Mar-2011 jilles <jilles@FreeBSD.org> sh: Fix some warnings in code for arithmetic expressions.

Submitted by: eadler
1cbab8a321b4fa3392f1ed1ec381b3fadbc41558 08-Feb-2011 jilles <jilles@FreeBSD.org> sh: Import arithmetic expression code from dash.

New features:
* proper lazy evaluation of || and &&
* ?: ternary operator
* executable is considerably smaller (8K on i386) because lex and yacc are
no longer used

Differences from dash:
* arith_t instead of intmax_t
* imaxdiv() not used
* unset or null variables default to 0
* let/exp builtin (undocumented, will probably be removed later)

Obtained from: dash