summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/aasmtai.pas4
-rw-r--r--compiler/cclasses.pas2
-rw-r--r--compiler/i386/daopt386.pas4
-rw-r--r--compiler/machoutils.pas8
-rw-r--r--compiler/nbas.pas6
-rw-r--r--compiler/ncgcnv.pas10
-rw-r--r--compiler/node.pas6
-rw-r--r--compiler/ogcoff.pas2
-rw-r--r--compiler/ognlm.pas6
-rw-r--r--compiler/symdef.pas2
-rw-r--r--compiler/x86/agx86att.pas8
-rw-r--r--compiler/x86/nx86cnv.pas2
12 files changed, 38 insertions, 22 deletions
diff --git a/compiler/aasmtai.pas b/compiler/aasmtai.pas
index 45e89c03cd..9cd9c32372 100644
--- a/compiler/aasmtai.pas
+++ b/compiler/aasmtai.pas
@@ -416,10 +416,12 @@ interface
destructor Destroy;override;
constructor ppuload(t:taitype;ppufile:tcompilerppufile);override;
procedure ppuwrite(ppufile:tcompilerppufile);override;
+{$push}{$warnings off}
private
{ this constructor is made private on purpose }
{ because sections should be created via new_section() }
constructor Create(Asectype:TAsmSectiontype;const Aname:string;Aalign:byte;Asecorder:TasmSectionorder=secorder_default);
+{$pop}
end;
@@ -2644,7 +2646,9 @@ implementation
end;
begin
+{$push}{$warnings off}
{ taitype should fit into a 4 byte set for speed reasons }
if ord(high(taitype))>31 then
internalerror(201108181);
+{$pop}
end.
diff --git a/compiler/cclasses.pas b/compiler/cclasses.pas
index b06c5ef96c..6a31211c46 100644
--- a/compiler/cclasses.pas
+++ b/compiler/cclasses.pas
@@ -1274,8 +1274,10 @@ end;
procedure TFPHashList.SetStrCapacity(NewCapacity: Integer);
begin
+{$push}{$warnings off}
If (NewCapacity < FStrCount) or (NewCapacity > MaxHashStrSize) then
Error (SListCapacityError, NewCapacity);
+{$pop}
if NewCapacity = FStrCapacity then
exit;
ReallocMem(FStrs, NewCapacity);
diff --git a/compiler/i386/daopt386.pas b/compiler/i386/daopt386.pas
index adf5a757c0..bdcaea11a2 100644
--- a/compiler/i386/daopt386.pas
+++ b/compiler/i386/daopt386.pas
@@ -715,8 +715,10 @@ function isgp32reg(supreg: tsuperregister): boolean;
{Checks if the register is a 32 bit general purpose register}
begin
isgp32reg := false;
+{$push}{$warnings off}
if (supreg >= RS_EAX) and (supreg <= RS_EBX) then
isgp32reg := true
+{$pop}
end;
@@ -1375,10 +1377,12 @@ procedure DestroyReg(p1: ptaiprop; supreg: tsuperregister; doincState:Boolean);
action (e.g. this register holds the contents of a variable and the value
of the variable in memory is changed) }
begin
+{$push}{$warnings off}
{ the following happens for fpu registers }
if (supreg < low(NrOfInstrSinceLastMod)) or
(supreg > high(NrOfInstrSinceLastMod)) then
exit;
+{$pop}
NrOfInstrSinceLastMod[supreg] := 0;
with p1^.regs[supreg] do
begin
diff --git a/compiler/machoutils.pas b/compiler/machoutils.pas
index 4359a15092..b9060b3127 100644
--- a/compiler/machoutils.pas
+++ b/compiler/machoutils.pas
@@ -1182,7 +1182,7 @@ const
begin
if not Assigned(fCnv) then
IntReadStruct;
- Result:=(index>=0) and (index<fHdr.ncmds);
+ Result:={(index>=0) and }(index<fHdr.ncmds);
if not Result then
Exit;
Result:=true;
@@ -1198,7 +1198,7 @@ const
if not Assigned(fCnv) then
IntReadStruct;
- Result:=(cmdindex>=0) and
+ Result:={(cmdindex>=0) and }
(cmdindex<fHdr.ncmds) and
(cmds[cmdindex].cmd in [LC_SEGMENT, LC_SEGMENT_64]);
@@ -1226,7 +1226,7 @@ const
if not Assigned(fCnv) then
IntReadStruct;
- if (index<0) or
+ if {(index<0) or}
(index>=longword(length(cmdofs))) then
Result:=0
else
@@ -1245,7 +1245,7 @@ const
begin
if not Assigned(fCnv) then
IntReadStruct;
- Result:=(secindex>=0) and (segindex>=0) and (segindex<fHdr.ncmds) and (cmds[segindex].cmd in [LC_SEGMENT, LC_SEGMENT_64]);
+ Result:={(secindex>=0) and (segindex>=0) and }(segindex<fHdr.ncmds) and (cmds[segindex].cmd in [LC_SEGMENT, LC_SEGMENT_64]);
if not Result then
Exit;
diff --git a/compiler/nbas.pas b/compiler/nbas.pas
index ba61e2df62..78b741fcf8 100644
--- a/compiler/nbas.pas
+++ b/compiler/nbas.pas
@@ -508,11 +508,11 @@ implementation
function tblocknode.pass_1 : tnode;
var
hp : tstatementnode;
- count : longint;
+ //count : longint;
begin
result:=nil;
expectloc:=LOC_VOID;
- count:=0;
+ //count:=0;
hp:=tstatementnode(left);
while assigned(hp) do
begin
@@ -523,7 +523,7 @@ implementation
hp.expectloc:=hp.left.expectloc;
end;
expectloc:=hp.expectloc;
- inc(count);
+ //inc(count);
hp:=tstatementnode(hp.right);
end;
end;
diff --git a/compiler/ncgcnv.pas b/compiler/ncgcnv.pas
index 86539e7306..ad20c667a1 100644
--- a/compiler/ncgcnv.pas
+++ b/compiler/ncgcnv.pas
@@ -34,6 +34,11 @@ interface
{ tcgtypeconvnode }
tcgtypeconvnode = class(ttypeconvnode)
+ protected
+{$ifdef cpuflags}
+ { CPUs without flags need a specific implementation of int -> bool }
+ procedure second_int_to_bool;override;
+{$endif cpuflags}
procedure second_int_to_int;override;
procedure second_cstring_to_pchar;override;
procedure second_cstring_to_int;override;
@@ -51,11 +56,8 @@ interface
procedure second_class_to_intf;override;
procedure second_char_to_char;override;
procedure second_nothing;override;
+ public
procedure pass_generate_code;override;
-{$ifdef cpuflags}
- { CPUs without flags need a specific implementation of int -> bool }
- procedure second_int_to_bool;override;
-{$endif cpuflags}
end;
tcgasnode = class(tasnode)
diff --git a/compiler/node.pas b/compiler/node.pas
index 7ca37dcc54..6504fa3807 100644
--- a/compiler/node.pas
+++ b/compiler/node.pas
@@ -390,7 +390,7 @@ interface
{ this node is the anchestor for all nodes with at least }
{ one child, you have to use it if you want to use }
{ true- and current_procinfo.CurrFalseLabel }
- punarynode = ^tunarynode;
+ //punarynode = ^tunarynode;
tunarynode = class(tnode)
left : tnode;
constructor create(t:tnodetype;l : tnode);
@@ -407,7 +407,7 @@ interface
procedure printnodedata(var t:text);override;
end;
- pbinarynode = ^tbinarynode;
+ //pbinarynode = ^tbinarynode;
tbinarynode = class(tunarynode)
right : tnode;
constructor create(t:tnodetype;l,r : tnode);
@@ -426,7 +426,7 @@ interface
procedure printnodelist(var t:text);
end;
- ptertiarynode = ^ttertiarynode;
+ //ptertiarynode = ^ttertiarynode;
ttertiarynode = class(tbinarynode)
third : tnode;
constructor create(_t:tnodetype;l,r,t : tnode);
diff --git a/compiler/ogcoff.pas b/compiler/ogcoff.pas
index ad82dc3f31..1360dff2c9 100644
--- a/compiler/ogcoff.pas
+++ b/compiler/ogcoff.pas
@@ -3018,7 +3018,7 @@ const pemagic : array[0..3] of byte = (
DLLReader.Seek(sechdr.datapos+expdir.AddrNames-sechdr.rvaofs+i*4);
DLLReader.Read(NameOfs,4);
Dec(NameOfs,sechdr.rvaofs);
- if (NameOfs<0) or
+ if {(NameOfs<0) or}
(NameOfs>sechdr.vsize) then
begin
Comment(V_Error,'DLL does contains invalid exports');
diff --git a/compiler/ognlm.pas b/compiler/ognlm.pas
index 8e892ae7a9..fb0f558a0c 100644
--- a/compiler/ognlm.pas
+++ b/compiler/ognlm.pas
@@ -254,9 +254,9 @@ const NLM_MAX_DESCRIPTION_LENGTH = 127;
nlmVersionHeader : nlm32_i386_external_version_header;
nlmExtHeader : nlm32_i386_external_extended_header;
nlmCustHeader : nlm32_i386_external_custom_header;
- nlmHelpFileName : TCmdStr;
- nlmMessagesFileName: TCmdStr;
- nlmXdcFileName : TCmdStr;
+ //nlmHelpFileName : TCmdStr;
+ //nlmMessagesFileName: TCmdStr;
+ //nlmXdcFileName : TCmdStr;
nlmCopyright : string;
nlmThreadname : string;
nlmScreenname : string;
diff --git a/compiler/symdef.pas b/compiler/symdef.pas
index cd5476e035..bb56514d71 100644
--- a/compiler/symdef.pas
+++ b/compiler/symdef.pas
@@ -1690,8 +1690,10 @@ implementation
procedure tenumdef.calcsavesize;
begin
+{$IFDEF CPU32} {$push}{$warnings off} {$ENDIF} //comparison always false warning
if (current_settings.packenum=8) or (min<low(longint)) or (int64(max)>high(cardinal)) then
savesize:=8
+{$IFDEF CPU32} {$pop} {$ENDIF}
else
if (current_settings.packenum=4) or (min<low(smallint)) or (max>high(word)) then
savesize:=4
diff --git a/compiler/x86/agx86att.pas b/compiler/x86/agx86att.pas
index 39e81ead63..8890780666 100644
--- a/compiler/x86/agx86att.pas
+++ b/compiler/x86/agx86att.pas
@@ -229,7 +229,9 @@ interface
procedure Tx86InstrWriter.WriteInstruction(hp: tai);
var
op : tasmop;
+{$ifdef x86_64}
val : aint;
+{$endif}
calljmp : boolean;
need_second_mov : boolean;
i : integer;
@@ -244,12 +246,12 @@ interface
the fix consists of simply setting only the 4-byte register
as the upper 4-bytes will be zeroed at the same time. }
need_second_mov:=false;
+{$ifdef x86_64}
if (op=A_MOV) and (taicpu(hp).opsize=S_Q) and
(taicpu(hp).oper[0]^.typ = top_const) then
begin
val := taicpu(hp).oper[0]^.val;
-{$ifdef x86_64}
- if (val > int64($7fffffff)) and (val < int64($100000000)) then
+ if (val > int64($7fffffff)) and (val < int64($100000000)) then
begin
owner.AsmWrite(target_asm.comment);
owner.AsmWritePChar('Fix for Win64-GAS bug');
@@ -262,8 +264,8 @@ interface
else
internalerror(20100902);
end;
-{$endif x86_64}
end;
+{$endif x86_64}
owner.AsmWrite(#9);
{ movsd should not be translated to movsl when there
are (xmm) arguments }
diff --git a/compiler/x86/nx86cnv.pas b/compiler/x86/nx86cnv.pas
index 2d679655cb..7884c5c803 100644
--- a/compiler/x86/nx86cnv.pas
+++ b/compiler/x86/nx86cnv.pas
@@ -30,7 +30,7 @@ interface
type
tx86typeconvnode = class(tcgtypeconvnode)
- protected
+ protected
function first_real_to_real : tnode;override;
{ procedure second_int_to_int;override; }
{ procedure second_string_to_string;override; }