freebsd-nq/bin/expr
Stefan Eßer 8da97f0057 Fix overflow check for multiplication:
- Add special test to detect the case of -1 * INTMAX_MIN
- Protect against elimination of the test division by the optimizer

Garrett Cooper noticed that the overflow checks were incomplete, and Bruce
Evans suggested the use of the "volatile" qualifier to counter the effect
of the undefined behaviour, when the prior multiplication caused overflow,
and he also suggested improvements to the comments.

Reviewed by:	bde
MFC after:	1 week
2015-01-27 18:04:41 +00:00
..
tests Integrate contrib/netbsd-tests/bin/expr into the build/kyua as bin/expr/tests 2015-01-19 06:13:07 +00:00
expr.1
expr.y Fix overflow check for multiplication: 2015-01-27 18:04:41 +00:00
Makefile Integrate contrib/netbsd-tests/bin/expr into the build/kyua as bin/expr/tests 2015-01-19 06:13:07 +00:00