fixed bug #467655
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 4 Oct 2001 08:12:33 +0000 (08:12 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 4 Oct 2001 08:12:33 +0000 (08:12 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1352 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCsymt.c

index fe7223a8323d0a97efbbd23a34ab14a3ef3c8db8..c0b1bcdc952336ec9ba78e1fcdee49b30ae7a457 100644 (file)
@@ -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;