From 09d39698e1a6e80f55d7cd95f721e93811b00f1e Mon Sep 17 00:00:00 2001 From: johanknol Date: Thu, 4 Oct 2001 08:12:33 +0000 Subject: [PATCH] fixed bug #467655 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1352 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCsymt.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/SDCCsymt.c b/src/SDCCsymt.c index fe7223a8..c0b1bcdc 100644 --- a/src/SDCCsymt.c +++ b/src/SDCCsymt.c @@ -1418,10 +1418,12 @@ computeType (sym_link * type1, sym_link * type2) reType = getSpec (rType); - /* if either of them unsigned then make this unsigned */ - if ((SPEC_USIGN (etype1) || SPEC_USIGN (etype2)) && !IS_FLOAT (reType)) + /* if either of them unsigned but not val then make this unsigned */ + if (((!IS_LITERAL(type1) && SPEC_USIGN (etype1)) || + (!IS_LITERAL(type2) && SPEC_USIGN (etype2))) && + !IS_FLOAT (reType)) SPEC_USIGN (reType) = 1; - + /* if result is a literal then make not so */ if (IS_LITERAL (reType)) SPEC_SCLS (reType) = S_REGISTER; -- 2.30.2