Parcourir la source

* fixed resulttype of unaryminusn for qwords on 32 bit platforms (was
qword, now is int64)
* simplified currency checking in unaryminusn pass_typecheck

git-svn-id: trunk@9524 -

Jonas Maebe il y a 17 ans
Parent
commit
67431891e0
1 fichiers modifiés avec 6 ajouts et 5 suppressions
  1. 6 5
      compiler/nmat.pas

+ 6 - 5
compiler/nmat.pas

@@ -617,7 +617,8 @@ implementation
            exit;
 
          resultdef:=left.resultdef;
-         if (left.resultdef.typ=floatdef) then
+         if (left.resultdef.typ=floatdef) or
+            is_currency(left.resultdef) then
            begin
            end
 {$ifdef SUPPORT_MMX}
@@ -636,14 +637,14 @@ implementation
 {$ifndef cpu64bit}
          else if is_64bit(left.resultdef) then
            begin
+             inserttypeconv(left,s64inttype);
+             resultdef:=left.resultdef
            end
 {$endif cpu64bit}
          else if (left.resultdef.typ=orddef) then
            begin
-              if (torddef(left.resultdef).ordtype <> scurrency) then begin
-                inserttypeconv(left,sinttype);
-                resultdef:=left.resultdef;
-              end;
+             inserttypeconv(left,sinttype);
+             resultdef:=left.resultdef
            end
          else
            begin