浏览代码

* reverted r43366

git-svn-id: trunk@43382 -
florian 5 年之前
父节点
当前提交
b8f186dab2
共有 3 个文件被更改,包括 0 次插入78 次删除
  1. 0 1
      .gitattributes
  2. 0 37
      rtl/objpas/math.pp
  3. 0 40
      tests/webtbs/tw36161.pp

+ 0 - 1
.gitattributes

@@ -17849,7 +17849,6 @@ tests/webtbs/tw36013.pp svneol=native#text/pascal
 tests/webtbs/tw3612.pp svneol=native#text/plain
 tests/webtbs/tw36156.pp svneol=native#text/plain
 tests/webtbs/tw36157.pp svneol=native#text/plain
-tests/webtbs/tw36161.pp svneol=native#text/pascal
 tests/webtbs/tw3617.pp svneol=native#text/plain
 tests/webtbs/tw3619.pp svneol=native#text/plain
 tests/webtbs/tw36196.pp svneol=native#text/pascal

+ 0 - 37
rtl/objpas/math.pp

@@ -167,10 +167,6 @@ function Min(a, b: Int64): Int64;inline; overload;
 function Max(a, b: Int64): Int64;inline; overload;
 function Min(a, b: QWord): QWord;inline; overload;
 function Max(a, b: QWord): QWord;inline; overload;
-function Min(a: Int64; b: Qword): Int64;inline; overload;
-function Min(a: Qword; b: Int64): Int64;inline; overload;
-function Max(a: Int64; b: Qword): QWord;inline; overload;
-function Max(a: Qword; b: Int64): QWord;inline; overload;
 {$ifdef FPC_HAS_TYPE_SINGLE}
 function Min(a, b: Single): Single;inline; overload;
 function Max(a, b: Single): Single;inline; overload;
@@ -2079,39 +2075,6 @@ begin
 end;
 
 {$ifdef FPC_HAS_TYPE_SINGLE}
-
-function Min(a: Int64; b: Qword): Int64;inline;
-begin
-  if a<0 then
-    Result:=a
-  else
-    Result:=Min(QWord(a),b);
-end;
-
-function Min(a: Qword; b: Int64): Int64;inline;
-begin
-  if b<0 then
-    Result:=b
-  else
-    Result:=Min(a,QWord(b));
-end;
-
-function Max(a: Int64; b: Qword): QWord;inline;
-begin
-  if a<0 then
-    Result:=b
-  else
-    Result:=Max(QWord(a),b);
-end;
-
-function Max(a: Qword; b: Int64): QWord;inline;
-begin
-  if b<0 then
-    Result:=a
-  else
-    Result:=Max(a,QWord(b));
-end;
-
 function Min(a, b: Single): Single;inline;
 begin
   if a < b then

+ 0 - 40
tests/webtbs/tw36161.pp

@@ -1,40 +0,0 @@
-{ %OPT=-O1 }
-program Project1;
-uses Math;
-var
-  t: Qword;
-  i: int64;
-begin
-  i:=-12345687;
-  t:=QWord($a000000000000000);
-  if Min(sizeof(t), t)<>sizeof(t) then
-    halt(1);
-  if Min(t, sizeof(t))<>sizeof(t) then
-    halt(2);
-  if Min(t, i)<>i then
-    halt(3);
-  if Min(i, t)<>i then
-    halt(4);
-  if Min(sizeof(t),sizeof(t))<>sizeof(t) then
-    halt(5);
-  if Min(t,t)<>t then
-    halt(6);
-  if Min(i,i)<>i then
-    halt(7);
-  
-  if Max(sizeof(t), t)<>t then
-    halt(11);
-  if Max(t, sizeof(t))<>t then
-    halt(12);
-  if Max(i, t)<>t then
-    halt(13);
-  if Max(t, i)<>t then
-    halt(14);
-  if Max(sizeof(t),sizeof(t))<>sizeof(t) then
-    halt(15);
-  if Max(t,t)<>t then
-    halt(16);
-  if Max(i,i)<>i then
-    halt(17);
-  writeln('ok');
-end.