summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornickysn <nickysn@3ad0048d-3df7-0310-abae-a5850022a9f2>2013-04-01 20:25:42 +0000
committernickysn <nickysn@3ad0048d-3df7-0310-abae-a5850022a9f2>2013-04-01 20:25:42 +0000
commit080125ebfb5488685a030fc22b22859ef5491b82 (patch)
tree2a715ffd1c81328541ba6f1d54713460c527718a
parent696c38415487da016059737c99c3fd6195a3fd27 (diff)
downloadfpc-080125ebfb5488685a030fc22b22859ef5491b82.tar.gz
* use min and max in defutil.get_common_intdef
git-svn-id: http://svn.freepascal.org/svn/fpc/branches/i8086@24120 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r--compiler/defutil.pas10
1 files changed, 3 insertions, 7 deletions
diff --git a/compiler/defutil.pas b/compiler/defutil.pas
index 14b82bddcf..359d81d697 100644
--- a/compiler/defutil.pas
+++ b/compiler/defutil.pas
@@ -309,7 +309,7 @@ interface
implementation
uses
- verbose;
+ verbose,cutils;
{ returns true, if def uses FPU }
function is_fpu(def : tdef) : boolean;
@@ -1220,12 +1220,8 @@ implementation
var
llow, lhigh: tconstexprint;
begin
- llow:=rd.low;
- if llow>ld.low then
- llow:=ld.low;
- lhigh:=rd.high;
- if lhigh<ld.high then
- lhigh:=ld.high;
+ llow:=min(ld.low,rd.low);
+ lhigh:=max(ld.high,rd.high);
case range_to_basetype(llow,lhigh) of
s8bit:
result:=torddef(s8inttype);