From 685be52a708d621af1940f62e0c9e7a4d593c8c9 Mon Sep 17 00:00:00 2001 From: pst Date: Sun, 8 Sep 1996 00:34:04 +0000 Subject: Workarround for gcc 2.60 expression evaluation bug. --- contrib/groff/libgroff/font.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'contrib') diff --git a/contrib/groff/libgroff/font.cc b/contrib/groff/libgroff/font.cc index 95da6b7..a90627e 100644 --- a/contrib/groff/libgroff/font.cc +++ b/contrib/groff/libgroff/font.cc @@ -194,7 +194,11 @@ static int scale_round(int n, int x, int y) } else { if (-(unsigned)n <= (-(unsigned)INT_MIN - y2)/x) - return (n*x - y2)/y; + { + // XXX simplify expression to work around bug in gcc-2.6.0 + int tmp = n*x - y2; + return tmp/y; + } return int(n*double(x)/double(y) - .5); } } -- cgit v1.1