"Dr. David Alan Gilbert" <[EMAIL PROTECTED]> wrote: > From the current cvs (as of a few minutes ago) when I do > > ./expr 6 + -2 > > I get 8. Every other version of expr I've tried gets 4 > which really does seem right. > > (This is on ubuntu Linux gcc 3.3.5 on x86) > > Can anyone replicate this?
I can :( Thanks for the report. Here's a snap fix. I'll add tests, too. Index: expr.c =================================================================== RCS file: /fetish/cu/src/expr.c,v retrieving revision 1.102 diff -u -p -r1.102 expr.c --- expr.c 14 May 2005 07:58:37 -0000 1.102 +++ expr.c 26 May 2005 16:00:27 -0000 @@ -356,7 +356,7 @@ toarith (VALUE *v) while (*++cp); free (v->u.s); - v->u.i = value * sign; + v->u.i = value; v->type = integer; return true; } _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils