From cb3a71f29cf1c1e3979b05b8d3d29a348f1d4003 Mon Sep 17 00:00:00 2001 From: bernhardheld Date: Sat, 18 Oct 2003 21:22:41 +0000 Subject: [PATCH] src/SDCCval.c (valMinus): fixed bug #826041 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2953 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 10 +++++++--- src/SDCCval.c | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index bbcb09f0..fd4ce637 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,13 +1,17 @@ +2003-10-13 Bernhard Held + + * src/SDCCval.c (valMinus): fixed bug #826041 + 2003-10-15 Erik Petrich Some hc08 related updates that I missed earlier * sim/ucsim/stypes.h - * support/regression/ports/hc08/spec.mk + * support/regression/ports/hc08/spec.mk 2003-10-15 Erik Petrich New target "hc08" for the Motorola 68hc08 family of micros - + * configure * configure.in * Makefile @@ -27,7 +31,7 @@ * support/regression/Makefile 2003-10-14 Erik Petrich - + * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c regression test * src/ds390/gen.c (genCast): fixed bug #821957 diff --git a/src/SDCCval.c b/src/SDCCval.c index a3d71f1c..8aa1e3b9 100644 --- a/src/SDCCval.c +++ b/src/SDCCval.c @@ -1297,7 +1297,7 @@ valMinus (value * lval, value * rval) } SPEC_USIGN (val->type) = (SPEC_USIGN (lval->etype) | SPEC_USIGN (rval->etype)); if (IS_FLOAT (val->type)) - SPEC_CVAL (val->type).v_float = floatFromVal (lval) + floatFromVal (rval); + SPEC_CVAL (val->type).v_float = floatFromVal (lval) - floatFromVal (rval); else { if (SPEC_USIGN (val->type)) -- 2.30.2