summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2021-04-11 18:18:30 +0000
committerflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2021-04-11 18:18:30 +0000
commitcde675f11d02e6f22d0089b2d06c39849c6b85ea (patch)
treef39ce074e5aaaf68c4bc3b36d4760f859d9bcd58
parent35233000326f551b2c8b8e57bd2e5f01d8428521 (diff)
downloadfpc-cde675f11d02e6f22d0089b2d06c39849c6b85ea.tar.gz
- obsolete defines removed
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@49184 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r--compiler/cclasses.pas16
-rw-r--r--compiler/constexp.pas10
-rw-r--r--compiler/cutils.pas48
-rw-r--r--compiler/systems/i_emx.pas2
-rw-r--r--compiler/verbose.pas4
5 files changed, 10 insertions, 70 deletions
diff --git a/compiler/cclasses.pas b/compiler/cclasses.pas
index 345549fe45..b1c9e8091a 100644
--- a/compiler/cclasses.pas
+++ b/compiler/cclasses.pas
@@ -23,9 +23,7 @@ unit cclasses;
{$i fpcdefs.inc}
-{$ifndef VER2_0}
- {$define CCLASSESINLINE}
-{$endif}
+{$define CCLASSESINLINE}
interface
@@ -88,14 +86,14 @@ type
procedure Put(Index: Integer; Item: Pointer);
procedure SetCapacity(NewCapacity: Integer);
procedure SetCount(NewCount: Integer);
- Procedure RaiseIndexError(Index : Integer);{$ifndef VER2_6}noreturn;{$endif VER2_6}
+ Procedure RaiseIndexError(Index : Integer);noreturn;
property List: PPointerList read FList;
public
destructor Destroy; override;
function Add(Item: Pointer): Integer;
procedure Clear;
procedure Delete(Index: Integer);
- class procedure Error(const Msg: string; Data: PtrInt);{$ifndef VER2_6}noreturn;{$endif VER2_6}
+ class procedure Error(const Msg: string; Data: PtrInt);noreturn;
procedure Exchange(Index1, Index2: Integer);
function Expand: TFPList;
function Extract(item: Pointer): Pointer;
@@ -227,7 +225,7 @@ type
function HashOfIndex(Index: Integer): LongWord;
function GetNextCollision(Index: Integer): Integer;
procedure Delete(Index: Integer);
- class procedure Error(const Msg: string; Data: PtrInt);{$ifndef VER2_6}noreturn;{$endif VER2_6}
+ class procedure Error(const Msg: string; Data: PtrInt);noreturn;
function Expand: TFPHashList;
function Extract(item: Pointer): Pointer;
function IndexOf(Item: Pointer): Integer;
@@ -718,7 +716,7 @@ implementation
TFPObjectList (Copied from rtl/objpas/classes/lists.inc)
*****************************************************************************}
-procedure TFPList.RaiseIndexError(Index : Integer);{$ifndef VER2_6}noreturn;{$endif VER2_6}
+procedure TFPList.RaiseIndexError(Index : Integer);noreturn;
begin
Error(SListIndexError, Index);
end;
@@ -814,7 +812,7 @@ begin
end;
end;
-class procedure TFPList.Error(const Msg: string; Data: PtrInt);{$ifndef VER2_6}noreturn;{$endif VER2_6}
+class procedure TFPList.Error(const Msg: string; Data: PtrInt);noreturn;
begin
Raise EListError.CreateFmt(Msg,[Data]) at get_caller_addr(get_frame), get_caller_frame(get_frame);
end;
@@ -1541,7 +1539,7 @@ begin
Self.Delete(Result);
end;
-class procedure TFPHashList.Error(const Msg: string; Data: PtrInt);{$ifndef VER2_6}noreturn;{$endif VER2_6}
+class procedure TFPHashList.Error(const Msg: string; Data: PtrInt);noreturn;
begin
Raise EListError.CreateFmt(Msg,[Data]) at get_caller_addr(get_frame), get_caller_frame(get_frame);
end;
diff --git a/compiler/constexp.pas b/compiler/constexp.pas
index e1a0f6a11e..502d540c31 100644
--- a/compiler/constexp.pas
+++ b/compiler/constexp.pas
@@ -90,7 +90,7 @@ implementation
{ use a separate procedure here instead of calling internalerrorproc directly because
- procedure variables cannot have a noreturn directive
- having a procedure and a procedure variable with the same name in the interfaces of different units is confusing }
-procedure internalerror(i:longint);{$ifndef VER2_6}noreturn;{$endif VER2_6}
+procedure internalerror(i:longint);noreturn;
begin
internalerrorproc(i);
@@ -196,10 +196,6 @@ try_qword:
result.overflow:=true;
end;
-{ workaround for 2.6.x bug }
-{$ifdef VER2_6}
- {$push} {$Q-}
-{$endif VER2_6}
function sub_from(const a:Tconstexprint;b:qword):Tconstexprint;
const abs_low_int64=qword(9223372036854775808); {abs(low(int64)) -> overflow error}
@@ -244,10 +240,6 @@ try_qword:
ov:
result.overflow:=true;
end;
-{ workaround for 2.6.x bug }
-{$ifdef VER2_6}
- {$pop}
-{$endif VER2_6}
operator + (const a,b:Tconstexprint):Tconstexprint;
diff --git a/compiler/cutils.pas b/compiler/cutils.pas
index d75b3cd486..1e9b077548 100644
--- a/compiler/cutils.pas
+++ b/compiler/cutils.pas
@@ -117,12 +117,6 @@ interface
}
function isabspowerof2(const value : Tconstexprint;out power : longint) : boolean;
function nextpowerof2(value : int64; out power: longint) : int64;
-{$ifdef VER2_6} { only 2.7.1+ has a popcnt function in the system unit }
- function PopCnt(AValue : Byte): Byte;
- function PopCnt(AValue : Word): Word;
- function PopCnt(AValue : DWord): DWord;
- function PopCnt(Const AValue : QWord): QWord;
-{$endif VER2_6}
function backspace_quote(const s:string;const qchars:Tcharset):string;
function octal_quote(const s:string;const qchars:Tcharset):string;
@@ -1015,48 +1009,6 @@ implementation
end;
end;
-{$ifdef VER2_6}
- const
- PopCntData : array[0..15] of byte = (0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4);
-
- function PopCnt(AValue : Byte): Byte;
- begin
- Result:=PopCntData[AValue and $f]+PopCntData[(AValue shr 4) and $f];
- end;
-
-
- function PopCnt(AValue : Word): Word;
- var
- i : SizeInt;
- begin
- Result:=0;
- for i:=0 to 3 do
- begin
- inc(Result,PopCntData[AValue and $f]);
- AValue:=AValue shr 4;
- end;
- end;
-
-
- function PopCnt(AValue : DWord): DWord;
- var
- i : SizeInt;
- begin
- Result:=0;
- for i:=0 to 7 do
- begin
- inc(Result,PopCntData[AValue and $f]);
- AValue:=AValue shr 4;
- end;
- end;
-
-
- function PopCnt(Const AValue : QWord): QWord;
- begin
- Result:=PopCnt(lo(AValue))+PopCnt(hi(AValue))
- end;
- {$endif VER2_6}
-
function backspace_quote(const s:string;const qchars:Tcharset):string;
diff --git a/compiler/systems/i_emx.pas b/compiler/systems/i_emx.pas
index b77304850a..b0bb34bd0e 100644
--- a/compiler/systems/i_emx.pas
+++ b/compiler/systems/i_emx.pas
@@ -112,12 +112,10 @@ unit i_emx;
initialization
{$ifdef CPUI386}
{$ifdef EMX}
- {$IFNDEF VER1_0}
set_source_info(system_i386_emx_info);
{ OS/2 via EMX can be run under DOS as well }
if (OS_Mode=osDOS) or (OS_Mode=osDPMI) then
source_info.scriptext := '.bat';
- {$ENDIF VER1_0}
{$endif EMX}
{$endif CPUI386}
end.
diff --git a/compiler/verbose.pas b/compiler/verbose.pas
index bc48697a02..414d01710a 100644
--- a/compiler/verbose.pas
+++ b/compiler/verbose.pas
@@ -89,7 +89,7 @@ interface
function ErrorCount:longint;
procedure SetErrorFlags(const s:string);
procedure GenerateError;
- procedure Internalerror(i:longint);{$ifndef VER2_6}noreturn;{$endif VER2_6}
+ procedure Internalerror(i:longint);noreturn;
procedure Comment(l:longint;s:ansistring);
function MessageStr(w:longint):TMsgStr;
procedure Message(w:longint;onqueue:tmsgqueueevent=nil);
@@ -583,7 +583,7 @@ implementation
end;
- procedure internalerror(i : longint);{$ifndef VER2_6}noreturn;{$endif VER2_6}
+ procedure internalerror(i : longint);noreturn;
begin
UpdateStatus;
do_internalerror(i);