From 0ab452aa42179a4dfbb04e7c5345cc3d1deca99f Mon Sep 17 00:00:00 2001 From: Paul Traina Date: Sun, 8 Sep 1996 00:34:04 +0000 Subject: [PATCH] Workarround for gcc 2.60 expression evaluation bug. --- contrib/groff/libgroff/font.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/groff/libgroff/font.cc b/contrib/groff/libgroff/font.cc index 95da6b7997c8..a90627e7c6ab 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); } }