mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-10 05:25:58 +02:00
* delay verbosity changes just like localswitches changes
* store a node's verbosity in the node so that e.g. disabling warnings also disables warnings for this node in pass_1 (the above together fix mantis #12076) * save/restore verbosity with {$push}/{$pop} (mantis #12075) * if warnings/notes/hints are turned off, also do not count encountered ones for the totals (otherwise -Sew cannot be used properly in combination with {$warnings off}, because disabled warnings will still trigger a compiler error) -- this required adding -vw/-vn/-vh to all tests using -Sew/-Sen/-Seh - removed some superfluous state saving/restoring from firstpass() git-svn-id: trunk@12025 -
This commit is contained in:
parent
658dd00f5f
commit
e5920bc2b8
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -8131,6 +8131,7 @@ tests/webtbf/tw11848a.pp svneol=native#text/plain
|
|||||||
tests/webtbf/tw11849a.pp svneol=native#text/plain
|
tests/webtbf/tw11849a.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw11862a.pp svneol=native#text/plain
|
tests/webtbf/tw11862a.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw11970.pp svneol=native#text/plain
|
tests/webtbf/tw11970.pp svneol=native#text/plain
|
||||||
|
tests/webtbf/tw12075.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw12329.pp svneol=native#text/plain
|
tests/webtbf/tw12329.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw12365a.cfg svneol=native#text/plain
|
tests/webtbf/tw12365a.cfg svneol=native#text/plain
|
||||||
tests/webtbf/tw12365a.pp svneol=native#text/plain
|
tests/webtbf/tw12365a.pp svneol=native#text/plain
|
||||||
@ -8593,6 +8594,7 @@ tests/webtbs/tw12050a.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw12050b.pp svneol=native#text/plain
|
tests/webtbs/tw12050b.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw12051.pp svneol=native#text/plain
|
tests/webtbs/tw12051.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw1207.pp svneol=native#text/plain
|
tests/webtbs/tw1207.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw12076.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw12186.pp svneol=native#text/plain
|
tests/webtbs/tw12186.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw12202.pp svneol=native#text/plain
|
tests/webtbs/tw12202.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw12214.pp svneol=native#text/plain
|
tests/webtbs/tw12214.pp svneol=native#text/plain
|
||||||
|
@ -161,6 +161,15 @@ interface
|
|||||||
property items[I:longint]:TLinkRec read getlinkrec; default;
|
property items[I:longint]:TLinkRec read getlinkrec; default;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
tpendingstate = record
|
||||||
|
nextverbositystr : string;
|
||||||
|
nextlocalswitches : tlocalswitches;
|
||||||
|
nextverbosityfullswitch: longint;
|
||||||
|
verbosityfullswitched,
|
||||||
|
localswitcheschanged : boolean;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
var
|
var
|
||||||
{ specified inputfile }
|
{ specified inputfile }
|
||||||
inputfilepath : string;
|
inputfilepath : string;
|
||||||
@ -252,9 +261,7 @@ interface
|
|||||||
init_settings,
|
init_settings,
|
||||||
current_settings : tsettings;
|
current_settings : tsettings;
|
||||||
|
|
||||||
nextlocalswitches : tlocalswitches;
|
pendingstate : tpendingstate;
|
||||||
localswitcheschanged : boolean;
|
|
||||||
|
|
||||||
{ Memory sizes }
|
{ Memory sizes }
|
||||||
heapsize,
|
heapsize,
|
||||||
stacksize,
|
stacksize,
|
||||||
|
@ -298,6 +298,7 @@ interface
|
|||||||
resultdefderef : tderef;
|
resultdefderef : tderef;
|
||||||
fileinfo : tfileposinfo;
|
fileinfo : tfileposinfo;
|
||||||
localswitches : tlocalswitches;
|
localswitches : tlocalswitches;
|
||||||
|
verbosity : longint;
|
||||||
optinfo : poptinfo;
|
optinfo : poptinfo;
|
||||||
constructor create(t:tnodetype);
|
constructor create(t:tnodetype);
|
||||||
{ this constructor is only for creating copies of class }
|
{ this constructor is only for creating copies of class }
|
||||||
@ -466,7 +467,7 @@ interface
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
cutils,verbose,ppu,
|
cutils,verbose,ppu,comphook,
|
||||||
symconst,
|
symconst,
|
||||||
nutils,nflw,
|
nutils,nflw,
|
||||||
defutil;
|
defutil;
|
||||||
@ -695,6 +696,7 @@ implementation
|
|||||||
{ save local info }
|
{ save local info }
|
||||||
fileinfo:=current_filepos;
|
fileinfo:=current_filepos;
|
||||||
localswitches:=current_settings.localswitches;
|
localswitches:=current_settings.localswitches;
|
||||||
|
verbosity:=status.verbosity;
|
||||||
resultdef:=nil;
|
resultdef:=nil;
|
||||||
flags:=[];
|
flags:=[];
|
||||||
end;
|
end;
|
||||||
@ -712,6 +714,7 @@ implementation
|
|||||||
blocktype:=tblock_type(ppufile.getbyte);
|
blocktype:=tblock_type(ppufile.getbyte);
|
||||||
ppufile.getposinfo(fileinfo);
|
ppufile.getposinfo(fileinfo);
|
||||||
ppufile.getsmallset(localswitches);
|
ppufile.getsmallset(localswitches);
|
||||||
|
verbosity:=ppufile.getlongint;
|
||||||
ppufile.getderef(resultdefderef);
|
ppufile.getderef(resultdefderef);
|
||||||
ppufile.getsmallset(flags);
|
ppufile.getsmallset(flags);
|
||||||
{ updated by firstpass }
|
{ updated by firstpass }
|
||||||
@ -726,6 +729,7 @@ implementation
|
|||||||
ppufile.putbyte(byte(block_type));
|
ppufile.putbyte(byte(block_type));
|
||||||
ppufile.putposinfo(fileinfo);
|
ppufile.putposinfo(fileinfo);
|
||||||
ppufile.putsmallset(localswitches);
|
ppufile.putsmallset(localswitches);
|
||||||
|
ppufile.putlongint(verbosity);
|
||||||
ppufile.putderef(resultdefderef);
|
ppufile.putderef(resultdefderef);
|
||||||
ppufile.putsmallset(flags);
|
ppufile.putsmallset(flags);
|
||||||
end;
|
end;
|
||||||
@ -887,6 +891,7 @@ implementation
|
|||||||
p.resultdef:=resultdef;
|
p.resultdef:=resultdef;
|
||||||
p.fileinfo:=fileinfo;
|
p.fileinfo:=fileinfo;
|
||||||
p.localswitches:=localswitches;
|
p.localswitches:=localswitches;
|
||||||
|
p.verbosity:=verbosity;
|
||||||
{ p.list:=list; }
|
{ p.list:=list; }
|
||||||
result:=p;
|
result:=p;
|
||||||
end;
|
end;
|
||||||
|
@ -41,7 +41,7 @@ implementation
|
|||||||
fksysutl,
|
fksysutl,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
cutils,cclasses,
|
cutils,cclasses,
|
||||||
globtype,version,tokens,systems,globals,verbose,
|
globtype,version,tokens,systems,globals,verbose,switches,
|
||||||
symbase,symtable,symsym,
|
symbase,symtable,symsym,
|
||||||
finput,fmodule,fppu,
|
finput,fmodule,fppu,
|
||||||
aasmbase,aasmtai,aasmdata,
|
aasmbase,aasmtai,aasmdata,
|
||||||
@ -309,11 +309,7 @@ implementation
|
|||||||
oldparse_only:=parse_only;
|
oldparse_only:=parse_only;
|
||||||
{ save akt... state }
|
{ save akt... state }
|
||||||
{ handle the postponed case first }
|
{ handle the postponed case first }
|
||||||
if localswitcheschanged then
|
flushpendingswitchesstate;
|
||||||
begin
|
|
||||||
current_settings.localswitches:=nextlocalswitches;
|
|
||||||
localswitcheschanged:=false;
|
|
||||||
end;
|
|
||||||
oldcurrent_filepos:=current_filepos;
|
oldcurrent_filepos:=current_filepos;
|
||||||
old_settings:=current_settings;
|
old_settings:=current_settings;
|
||||||
end;
|
end;
|
||||||
|
@ -41,7 +41,7 @@ interface
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
globtype,systems,cclasses,
|
globtype,comphook,systems,cclasses,
|
||||||
cutils,globals,
|
cutils,globals,
|
||||||
procinfo,
|
procinfo,
|
||||||
cgbase,symdef
|
cgbase,symdef
|
||||||
@ -61,6 +61,7 @@ implementation
|
|||||||
var
|
var
|
||||||
oldcodegenerror : boolean;
|
oldcodegenerror : boolean;
|
||||||
oldlocalswitches : tlocalswitches;
|
oldlocalswitches : tlocalswitches;
|
||||||
|
oldverbosity : longint;
|
||||||
oldpos : tfileposinfo;
|
oldpos : tfileposinfo;
|
||||||
hp : tnode;
|
hp : tnode;
|
||||||
begin
|
begin
|
||||||
@ -69,9 +70,11 @@ implementation
|
|||||||
oldcodegenerror:=codegenerror;
|
oldcodegenerror:=codegenerror;
|
||||||
oldpos:=current_filepos;
|
oldpos:=current_filepos;
|
||||||
oldlocalswitches:=current_settings.localswitches;
|
oldlocalswitches:=current_settings.localswitches;
|
||||||
|
oldverbosity:=status.verbosity;
|
||||||
codegenerror:=false;
|
codegenerror:=false;
|
||||||
current_filepos:=p.fileinfo;
|
current_filepos:=p.fileinfo;
|
||||||
current_settings.localswitches:=p.localswitches;
|
current_settings.localswitches:=p.localswitches;
|
||||||
|
status.verbosity:=p.verbosity;
|
||||||
hp:=p.pass_typecheck;
|
hp:=p.pass_typecheck;
|
||||||
{ should the node be replaced? }
|
{ should the node be replaced? }
|
||||||
if assigned(hp) then
|
if assigned(hp) then
|
||||||
@ -84,6 +87,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
current_settings.localswitches:=oldlocalswitches;
|
current_settings.localswitches:=oldlocalswitches;
|
||||||
current_filepos:=oldpos;
|
current_filepos:=oldpos;
|
||||||
|
status.verbosity:=oldverbosity;
|
||||||
if codegenerror then
|
if codegenerror then
|
||||||
begin
|
begin
|
||||||
include(p.flags,nf_error);
|
include(p.flags,nf_error);
|
||||||
@ -115,6 +119,7 @@ implementation
|
|||||||
oldcodegenerror : boolean;
|
oldcodegenerror : boolean;
|
||||||
oldlocalswitches : tlocalswitches;
|
oldlocalswitches : tlocalswitches;
|
||||||
oldpos : tfileposinfo;
|
oldpos : tfileposinfo;
|
||||||
|
oldverbosity: longint;
|
||||||
hp : tnode;
|
hp : tnode;
|
||||||
begin
|
begin
|
||||||
if (nf_pass1_done in p.flags) then
|
if (nf_pass1_done in p.flags) then
|
||||||
@ -124,17 +129,17 @@ implementation
|
|||||||
oldcodegenerror:=codegenerror;
|
oldcodegenerror:=codegenerror;
|
||||||
oldpos:=current_filepos;
|
oldpos:=current_filepos;
|
||||||
oldlocalswitches:=current_settings.localswitches;
|
oldlocalswitches:=current_settings.localswitches;
|
||||||
|
oldverbosity:=status.verbosity;
|
||||||
codegenerror:=false;
|
codegenerror:=false;
|
||||||
current_filepos:=p.fileinfo;
|
current_filepos:=p.fileinfo;
|
||||||
current_settings.localswitches:=p.localswitches;
|
current_settings.localswitches:=p.localswitches;
|
||||||
|
status.verbosity:=p.verbosity;
|
||||||
{ checks make always a call }
|
{ checks make always a call }
|
||||||
if ([cs_check_range,cs_check_overflow,cs_check_stack] * current_settings.localswitches <> []) then
|
if ([cs_check_range,cs_check_overflow,cs_check_stack] * current_settings.localswitches <> []) then
|
||||||
include(current_procinfo.flags,pi_do_call);
|
include(current_procinfo.flags,pi_do_call);
|
||||||
{ determine the resultdef if not done }
|
{ determine the resultdef if not done }
|
||||||
if (p.resultdef=nil) then
|
if (p.resultdef=nil) then
|
||||||
begin
|
begin
|
||||||
current_filepos:=p.fileinfo;
|
|
||||||
current_settings.localswitches:=p.localswitches;
|
|
||||||
hp:=p.pass_typecheck;
|
hp:=p.pass_typecheck;
|
||||||
{ should the node be replaced? }
|
{ should the node be replaced? }
|
||||||
if assigned(hp) then
|
if assigned(hp) then
|
||||||
@ -152,15 +157,11 @@ implementation
|
|||||||
if p.resultdef=nil then
|
if p.resultdef=nil then
|
||||||
p.resultdef:=generrordef;
|
p.resultdef:=generrordef;
|
||||||
end;
|
end;
|
||||||
current_settings.localswitches:=oldlocalswitches;
|
|
||||||
current_filepos:=oldpos;
|
|
||||||
codegenerror:=codegenerror or oldcodegenerror;
|
codegenerror:=codegenerror or oldcodegenerror;
|
||||||
end;
|
end;
|
||||||
if not(nf_error in p.flags) then
|
if not(nf_error in p.flags) then
|
||||||
begin
|
begin
|
||||||
{ first pass }
|
{ first pass }
|
||||||
current_filepos:=p.fileinfo;
|
|
||||||
current_settings.localswitches:=p.localswitches;
|
|
||||||
hp:=p.pass_1;
|
hp:=p.pass_1;
|
||||||
{ should the node be replaced? }
|
{ should the node be replaced? }
|
||||||
if assigned(hp) then
|
if assigned(hp) then
|
||||||
@ -197,6 +198,7 @@ implementation
|
|||||||
codegenerror:=codegenerror or oldcodegenerror;
|
codegenerror:=codegenerror or oldcodegenerror;
|
||||||
current_settings.localswitches:=oldlocalswitches;
|
current_settings.localswitches:=oldlocalswitches;
|
||||||
current_filepos:=oldpos;
|
current_filepos:=oldpos;
|
||||||
|
status.verbosity:=oldverbosity;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
codegenerror:=true;
|
codegenerror:=true;
|
||||||
|
@ -43,7 +43,7 @@ type
|
|||||||
{$endif Test_Double_checksum}
|
{$endif Test_Double_checksum}
|
||||||
|
|
||||||
const
|
const
|
||||||
CurrentPPUVersion = 92;
|
CurrentPPUVersion = 93;
|
||||||
|
|
||||||
{ buffer sizes }
|
{ buffer sizes }
|
||||||
maxentrysize = 1024;
|
maxentrysize = 1024;
|
||||||
|
@ -41,11 +41,17 @@ implementation
|
|||||||
rabase;
|
rabase;
|
||||||
|
|
||||||
const
|
const
|
||||||
localswitchesstackmax = 20;
|
switchesstatestackmax = 20;
|
||||||
|
|
||||||
|
type
|
||||||
|
tsavedswitchesstate = record
|
||||||
|
localsw: tlocalswitches;
|
||||||
|
verbosity: longint;
|
||||||
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
localswitchesstack: array[0..localswitchesstackmax] of tlocalswitches;
|
switchesstatestack: array[0..switchesstatestackmax] of tsavedswitchesstate;
|
||||||
localswitchesstackpos: Integer;
|
switchesstatestackpos: Integer;
|
||||||
|
|
||||||
{*****************************************************************************
|
{*****************************************************************************
|
||||||
Helpers
|
Helpers
|
||||||
@ -68,7 +74,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
{ support ON/OFF }
|
{ support ON/OFF }
|
||||||
state:=current_scanner.ReadState;
|
state:=current_scanner.ReadState;
|
||||||
SetVerbosity(flag+state);
|
recordpendingverbosityswitch(flag,state);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -93,15 +99,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
state:=current_scanner.readstate;
|
state:=current_scanner.readstate;
|
||||||
if (sw<>cs_localnone) and (state in ['-','+']) then
|
if (sw<>cs_localnone) and (state in ['-','+']) then
|
||||||
begin
|
recordpendinglocalswitch(sw,state);
|
||||||
if not localswitcheschanged then
|
|
||||||
nextlocalswitches:=current_settings.localswitches;
|
|
||||||
if state='-' then
|
|
||||||
exclude(nextlocalswitches,sw)
|
|
||||||
else
|
|
||||||
include(nextlocalswitches,sw);
|
|
||||||
localswitcheschanged:=true;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure do_localswitchdefault(sw:tlocalswitch);
|
procedure do_localswitchdefault(sw:tlocalswitch);
|
||||||
@ -110,23 +108,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
state:=current_scanner.readstatedefault;
|
state:=current_scanner.readstatedefault;
|
||||||
if (sw<>cs_localnone) and (state in ['-','+','*']) then
|
if (sw<>cs_localnone) and (state in ['-','+','*']) then
|
||||||
begin
|
recordpendinglocalswitch(sw,state);
|
||||||
if not localswitcheschanged then
|
|
||||||
nextlocalswitches:=current_settings.localswitches;
|
|
||||||
if state='-' then
|
|
||||||
exclude(nextlocalswitches,sw)
|
|
||||||
else
|
|
||||||
if state='+' then
|
|
||||||
include(nextlocalswitches,sw)
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
if sw in init_settings.localswitches then
|
|
||||||
include(nextlocalswitches,sw)
|
|
||||||
else
|
|
||||||
exclude(nextlocalswitches,sw);
|
|
||||||
end;
|
|
||||||
localswitcheschanged:=true;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -945,16 +927,12 @@ implementation
|
|||||||
procedure dir_pop;
|
procedure dir_pop;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if localswitchesstackpos < 1 then
|
if switchesstatestackpos < 1 then
|
||||||
Message(scan_e_too_many_pop);
|
Message(scan_e_too_many_pop);
|
||||||
|
|
||||||
if not localswitcheschanged then
|
Dec(switchesstatestackpos);
|
||||||
nextlocalswitches:=current_settings.localswitches;
|
recordpendinglocalfullswitch(switchesstatestack[switchesstatestackpos].localsw);
|
||||||
|
recordpendingverbosityfullswitch(switchesstatestack[switchesstatestackpos].verbosity);
|
||||||
Dec(localswitchesstackpos);
|
|
||||||
nextlocalswitches:= localswitchesstack[localswitchesstackpos];
|
|
||||||
|
|
||||||
localswitcheschanged:=true;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure dir_profile;
|
procedure dir_profile;
|
||||||
@ -970,17 +948,14 @@ implementation
|
|||||||
procedure dir_push;
|
procedure dir_push;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if localswitchesstackpos > localswitchesstackmax then
|
if switchesstatestackpos > switchesstatestackmax then
|
||||||
Message(scan_e_too_many_push);
|
Message(scan_e_too_many_push);
|
||||||
|
|
||||||
if localswitcheschanged then
|
flushpendingswitchesstate;
|
||||||
begin
|
|
||||||
current_settings.localswitches:=nextlocalswitches;
|
|
||||||
localswitcheschanged:=false;
|
|
||||||
end;
|
|
||||||
|
|
||||||
localswitchesstack[localswitchesstackpos]:= current_settings.localswitches;
|
switchesstatestack[switchesstatestackpos].localsw:= current_settings.localswitches;
|
||||||
Inc(localswitchesstackpos);
|
switchesstatestack[switchesstatestackpos].verbosity:=status.verbosity;
|
||||||
|
Inc(switchesstatestackpos);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure dir_rangechecks;
|
procedure dir_rangechecks;
|
||||||
@ -1434,5 +1409,5 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
localswitchesstackpos:= 0;
|
switchesstatestackpos:= 0;
|
||||||
end.
|
end.
|
||||||
|
@ -332,11 +332,7 @@ implementation
|
|||||||
if b then
|
if b then
|
||||||
begin
|
begin
|
||||||
{ resolve all postponed switch changes }
|
{ resolve all postponed switch changes }
|
||||||
if localswitcheschanged then
|
flushpendingswitchesstate;
|
||||||
begin
|
|
||||||
current_settings.localswitches:=nextlocalswitches;
|
|
||||||
localswitcheschanged:=false;
|
|
||||||
end;
|
|
||||||
|
|
||||||
HandleModeSwitches(changeinit);
|
HandleModeSwitches(changeinit);
|
||||||
|
|
||||||
@ -526,11 +522,7 @@ implementation
|
|||||||
|
|
||||||
procedure dir_ifopt;
|
procedure dir_ifopt;
|
||||||
begin
|
begin
|
||||||
if localswitcheschanged then
|
flushpendingswitchesstate;
|
||||||
begin
|
|
||||||
current_settings.localswitches:=nextlocalswitches;
|
|
||||||
localswitcheschanged:=false;
|
|
||||||
end;
|
|
||||||
current_scanner.ifpreprocstack(pp_ifopt,@opt_check,scan_c_ifopt_found);
|
current_scanner.ifpreprocstack(pp_ifopt,@opt_check,scan_c_ifopt_found);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -3200,11 +3192,7 @@ In case not, the value returned can be arbitrary.
|
|||||||
label
|
label
|
||||||
exit_label;
|
exit_label;
|
||||||
begin
|
begin
|
||||||
if localswitcheschanged then
|
flushpendingswitchesstate;
|
||||||
begin
|
|
||||||
current_settings.localswitches:=nextlocalswitches;
|
|
||||||
localswitcheschanged:=false;
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ record tokens? }
|
{ record tokens? }
|
||||||
if allowrecordtoken and
|
if allowrecordtoken and
|
||||||
|
@ -25,14 +25,23 @@ unit switches;
|
|||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
globtype;
|
||||||
|
|
||||||
procedure HandleSwitch(switch,state:char);
|
procedure HandleSwitch(switch,state:char);
|
||||||
function CheckSwitch(switch,state:char):boolean;
|
function CheckSwitch(switch,state:char):boolean;
|
||||||
|
|
||||||
|
procedure recordpendingverbosityswitch(sw: char; state: char);
|
||||||
|
procedure recordpendinglocalswitch(sw: tlocalswitch; state: char);
|
||||||
|
procedure recordpendinglocalfullswitch(const switches: tlocalswitches);
|
||||||
|
procedure recordpendingverbosityfullswitch(verbosity: longint);
|
||||||
|
procedure flushpendingswitchesstate;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
uses
|
uses
|
||||||
globtype,systems,cpuinfo,
|
systems,cpuinfo,
|
||||||
globals,verbose,fmodule;
|
globals,verbose,comphook,
|
||||||
|
fmodule;
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
Main Switches Parsing
|
Main Switches Parsing
|
||||||
@ -149,15 +158,7 @@ begin
|
|||||||
unsupportedsw :
|
unsupportedsw :
|
||||||
Message1(scan_w_unsupported_switch,'$'+switch);
|
Message1(scan_w_unsupported_switch,'$'+switch);
|
||||||
localsw :
|
localsw :
|
||||||
begin
|
recordpendinglocalswitch(tlocalswitch(setsw),state);
|
||||||
if not localswitcheschanged then
|
|
||||||
nextlocalswitches:=current_settings.localswitches;
|
|
||||||
if state='+' then
|
|
||||||
include(nextlocalswitches,tlocalswitch(setsw))
|
|
||||||
else
|
|
||||||
exclude(nextlocalswitches,tlocalswitch(setsw));
|
|
||||||
localswitcheschanged:=true;
|
|
||||||
end;
|
|
||||||
modulesw :
|
modulesw :
|
||||||
begin
|
begin
|
||||||
if current_module.in_global then
|
if current_module.in_global then
|
||||||
@ -256,4 +257,64 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure recordpendingverbosityswitch(sw: char; state: char);
|
||||||
|
begin
|
||||||
|
pendingstate.nextverbositystr:=pendingstate.nextverbositystr+sw+state;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure recordpendinglocalswitch(sw: tlocalswitch; state: char);
|
||||||
|
begin
|
||||||
|
if not pendingstate.localswitcheschanged then
|
||||||
|
pendingstate.nextlocalswitches:=current_settings.localswitches;
|
||||||
|
if state='-' then
|
||||||
|
exclude(pendingstate.nextlocalswitches,sw)
|
||||||
|
else if state='+' then
|
||||||
|
include(pendingstate.nextlocalswitches,sw)
|
||||||
|
else { state = '*' }
|
||||||
|
begin
|
||||||
|
if sw in init_settings.localswitches then
|
||||||
|
include(pendingstate.nextlocalswitches,sw)
|
||||||
|
else
|
||||||
|
exclude(pendingstate.nextlocalswitches,sw);
|
||||||
|
end;
|
||||||
|
pendingstate.localswitcheschanged:=true;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure recordpendinglocalfullswitch(const switches: tlocalswitches);
|
||||||
|
begin
|
||||||
|
pendingstate.nextlocalswitches:=switches;
|
||||||
|
pendingstate.localswitcheschanged:=true;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure recordpendingverbosityfullswitch(verbosity: longint);
|
||||||
|
begin
|
||||||
|
pendingstate.nextverbositystr:='';
|
||||||
|
pendingstate.nextverbosityfullswitch:=verbosity;
|
||||||
|
pendingstate.verbosityfullswitched:=true;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure flushpendingswitchesstate;
|
||||||
|
begin
|
||||||
|
if pendingstate.localswitcheschanged then
|
||||||
|
begin
|
||||||
|
current_settings.localswitches:=pendingstate.nextlocalswitches;
|
||||||
|
pendingstate.localswitcheschanged:=false;
|
||||||
|
end;
|
||||||
|
if pendingstate.verbosityfullswitched then
|
||||||
|
begin
|
||||||
|
status.verbosity:=pendingstate.nextverbosityfullswitch;
|
||||||
|
pendingstate.verbosityfullswitched:=false;
|
||||||
|
end;
|
||||||
|
if pendingstate.nextverbositystr<>'' then
|
||||||
|
begin
|
||||||
|
setverbosity(pendingstate.nextverbositystr);
|
||||||
|
pendingstate.nextverbositystr:='';
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -579,6 +579,7 @@ implementation
|
|||||||
'W':
|
'W':
|
||||||
begin
|
begin
|
||||||
v:=v or V_Warning;
|
v:=v or V_Warning;
|
||||||
|
if CheckVerbosity(V_Warning) then
|
||||||
if status.errorwarning then
|
if status.errorwarning then
|
||||||
inc(status.errorcount)
|
inc(status.errorcount)
|
||||||
else
|
else
|
||||||
@ -587,6 +588,7 @@ implementation
|
|||||||
'N' :
|
'N' :
|
||||||
begin
|
begin
|
||||||
v:=v or V_Note;
|
v:=v or V_Note;
|
||||||
|
if CheckVerbosity(V_Note) then
|
||||||
if status.errornote then
|
if status.errornote then
|
||||||
inc(status.errorcount)
|
inc(status.errorcount)
|
||||||
else
|
else
|
||||||
@ -595,6 +597,7 @@ implementation
|
|||||||
'H' :
|
'H' :
|
||||||
begin
|
begin
|
||||||
v:=v or V_Hint;
|
v:=v or V_Hint;
|
||||||
|
if CheckVerbosity(V_Hint) then
|
||||||
if status.errorhint then
|
if status.errorhint then
|
||||||
inc(status.errorcount)
|
inc(status.errorcount)
|
||||||
else
|
else
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ %FAIL }
|
{ %FAIL }
|
||||||
{ %OPT=-Sew }
|
{ %OPT=-Sew -vw }
|
||||||
|
|
||||||
{ Old file: tbf0351.pp }
|
{ Old file: tbf0351.pp }
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ %fail }
|
{ %fail }
|
||||||
{ %OPT=-Sew }
|
{ %OPT=-Sew -vw }
|
||||||
{$calling }
|
{$calling }
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sew }
|
{ %OPT=-Sew -vw }
|
||||||
{ %fail }
|
{ %fail }
|
||||||
|
|
||||||
{$T-}
|
{$T-}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sew }
|
{ %OPT=-Sew -vw }
|
||||||
{ %fail }
|
{ %fail }
|
||||||
|
|
||||||
{$T-}
|
{$T-}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
{ %fail }
|
{ %fail }
|
||||||
|
|
||||||
{$ifdef fpc}
|
{$ifdef fpc}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ %fail }
|
{ %fail }
|
||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
var
|
var
|
||||||
a: longint;
|
a: longint;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ %norun }
|
{ %norun }
|
||||||
{ %fail }
|
{ %fail }
|
||||||
{ %opt=-Sen }
|
{ %opt=-Sen -vn }
|
||||||
|
|
||||||
type
|
type
|
||||||
tr = record
|
tr = record
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ %norun }
|
{ %norun }
|
||||||
{ %fail }
|
{ %fail }
|
||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
type
|
type
|
||||||
tr = record
|
tr = record
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
{ %fail }
|
{ %fail }
|
||||||
{$mode objfpc}
|
{$mode objfpc}
|
||||||
procedure p(out o);
|
procedure p(out o);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ %fail }
|
{ %fail }
|
||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
procedure test;
|
procedure test;
|
||||||
var
|
var
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT= -Sen }
|
{ %OPT= -Sen -vn }
|
||||||
|
|
||||||
{ Old file: tbs0317.pp }
|
{ Old file: tbs0317.pp }
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sen }
|
{ %OPT=-Sen -vn }
|
||||||
|
|
||||||
{ Old file: tbs0339.pp }
|
{ Old file: tbs0339.pp }
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{%OPT=-Sew}
|
{%OPT=-Sew -vw}
|
||||||
{$mode objfpc}
|
{$mode objfpc}
|
||||||
|
|
||||||
function f: longint;
|
function f: longint;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Seh }
|
{ %OPT=-Seh -vh }
|
||||||
program test;
|
program test;
|
||||||
uses math;
|
uses math;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sen }
|
{ %OPT=-Sen -vn }
|
||||||
|
|
||||||
{$mode objfpc}
|
{$mode objfpc}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ %norun }
|
{ %norun }
|
||||||
{ %opt=-Sen }
|
{ %opt=-Sen -vn }
|
||||||
type
|
type
|
||||||
TRegister = (
|
TRegister = (
|
||||||
TRegisterLowEnum := Low(longint),
|
TRegisterLowEnum := Low(longint),
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sew }
|
{ %OPT=-Sew -vw }
|
||||||
|
|
||||||
{$T-}
|
{$T-}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
{$ifdef fpc}
|
{$ifdef fpc}
|
||||||
{$mode delphi}
|
{$mode delphi}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ %norun }
|
{ %norun }
|
||||||
{ %opt=-Sen }
|
{ %opt=-Sen -vn }
|
||||||
|
|
||||||
type
|
type
|
||||||
tr = record
|
tr = record
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
{$mode objfpc}
|
{$mode objfpc}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ %norun }
|
{ %norun }
|
||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
procedure t;
|
procedure t;
|
||||||
var
|
var
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Sew }
|
{ %opt=-vw -Sew }
|
||||||
|
|
||||||
var
|
var
|
||||||
p : pointer;
|
p : pointer;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ %target=linux,solaris,freebsd,win32 }
|
{ %target=linux,solaris,freebsd,win32 }
|
||||||
{ %fail }
|
{ %fail }
|
||||||
{ %opt=-Sew }
|
{ %opt=-vw -Sew }
|
||||||
|
|
||||||
{ just some random non-darwin targets }
|
{ just some random non-darwin targets }
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ %recompile }
|
{ %recompile }
|
||||||
{ %fail }
|
{ %fail }
|
||||||
{ %opt=-Sew -Cn }
|
{ %opt=-vw -Sew -Cn }
|
||||||
|
|
||||||
uses umainnam;
|
uses umainnam;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sew }
|
{ %OPT=-Sew -vw }
|
||||||
{ %fail }
|
{ %fail }
|
||||||
{ this should generate a warning
|
{ this should generate a warning
|
||||||
because s is not initialized }
|
because s is not initialized }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sew }
|
{ %OPT=-Sew -vw }
|
||||||
{ %fail }
|
{ %fail }
|
||||||
{ this should generate a warning
|
{ this should generate a warning
|
||||||
because s is not initialized }
|
because s is not initialized }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sew }
|
{ %OPT=-Sew -vw }
|
||||||
{ %fail }
|
{ %fail }
|
||||||
procedure p;experimental;
|
procedure p;experimental;
|
||||||
begin
|
begin
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ %fail }
|
{ %fail }
|
||||||
{ %opt=-Se1w2 }
|
{ %opt=-Se1w2 -vw }
|
||||||
|
|
||||||
var
|
var
|
||||||
pc: pchar;
|
pc: pchar;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sew -Oodfa }
|
{ %OPT=-Sew -vw -Oodfa }
|
||||||
{ %NORUN }
|
{ %NORUN }
|
||||||
{ %fail }
|
{ %fail }
|
||||||
{$mode objfpc}
|
{$mode objfpc}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sew -Oodfa }
|
{ %OPT=-Sew -vw -Oodfa }
|
||||||
{ %NORUN }
|
{ %NORUN }
|
||||||
{ %fail }
|
{ %fail }
|
||||||
{$mode objfpc}
|
{$mode objfpc}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sew -Oodfa }
|
{ %OPT=-Sew -vw -Oodfa }
|
||||||
{ %FAIL }
|
{ %FAIL }
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sew -Oodfa }
|
{ %OPT=-Sew -vw -Oodfa }
|
||||||
{ %fail }
|
{ %fail }
|
||||||
{$mode objfpc}
|
{$mode objfpc}
|
||||||
procedure GiveMe(var i: integer);
|
procedure GiveMe(var i: integer);
|
||||||
|
18
tests/webtbf/tw12075.pp
Normal file
18
tests/webtbf/tw12075.pp
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{ %fail }
|
||||||
|
{ %opt=-Sew -vw-}
|
||||||
|
|
||||||
|
{$mode macpas}
|
||||||
|
program popwarnings;
|
||||||
|
var
|
||||||
|
p: Pointer;
|
||||||
|
offs: PtrInt;
|
||||||
|
a: array[ 1..100] of integer;
|
||||||
|
begin
|
||||||
|
{$warnings on}
|
||||||
|
p:= @a;
|
||||||
|
offs:= SizeOf(integer);
|
||||||
|
{$push}
|
||||||
|
{$warnings off}
|
||||||
|
{$pop}
|
||||||
|
PtrUInt(p):=PtrUInt(p) + offs;
|
||||||
|
end.
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
{ %fail }
|
{ %fail }
|
||||||
|
|
||||||
{ Source provided for Free Pascal Bug Report 2209 }
|
{ Source provided for Free Pascal Bug Report 2209 }
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ %fail }
|
{ %fail }
|
||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
{ Source provided for Free Pascal Bug Report 2752 }
|
{ Source provided for Free Pascal Bug Report 2752 }
|
||||||
{ Submitted by "Micha" on 2003-10-26 }
|
{ Submitted by "Micha" on 2003-10-26 }
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ %fail }
|
{ %fail }
|
||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
{ Source provided for Free Pascal Bug Report 3553 }
|
{ Source provided for Free Pascal Bug Report 3553 }
|
||||||
{ Submitted by "Naj Kejah" on 2005-01-15 }
|
{ Submitted by "Naj Kejah" on 2005-01-15 }
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ %fail }
|
{ %fail }
|
||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
procedure p;
|
procedure p;
|
||||||
var
|
var
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ %fail }
|
{ %fail }
|
||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
var
|
var
|
||||||
a : array[0..32] of byte;
|
a : array[0..32] of byte;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ %fail }
|
{ %fail }
|
||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
{ Source provided for Free Pascal Bug Report 3643 }
|
{ Source provided for Free Pascal Bug Report 3643 }
|
||||||
{ Submitted by "Naj Kejah" on 2005-02-08 }
|
{ Submitted by "Naj Kejah" on 2005-02-08 }
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ %fail }
|
{ %fail }
|
||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
{ Source provided for Free Pascal Bug Report 4139 }
|
{ Source provided for Free Pascal Bug Report 4139 }
|
||||||
{ Submitted by "Christian Iversen" on 2005-06-29 }
|
{ Submitted by "Christian Iversen" on 2005-06-29 }
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ %fail }
|
{ %fail }
|
||||||
{ %OPT=-CO -Sewnh -vh}
|
{ %OPT=-CO -Sewnh -vwnh }
|
||||||
{ changed -Seh to -Sewnh because -Cr option
|
{ changed -Seh to -Sewnh because -Cr option
|
||||||
changes the hint into a warning PM }
|
changes the hint into a warning PM }
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Oodfa -Sew }
|
{ %opt=-Oodfa -Sew -vw }
|
||||||
{ %fail }
|
{ %fail }
|
||||||
{$IFDEF FPC}
|
{$IFDEF FPC}
|
||||||
{$mode delphi}
|
{$mode delphi}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Oodfa -Sew }
|
{ %opt=-Oodfa -Sew -vw }
|
||||||
{ %fail }
|
{ %fail }
|
||||||
{$IFDEF FPC}
|
{$IFDEF FPC}
|
||||||
{$mode delphi}
|
{$mode delphi}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ %fail }
|
{ %fail }
|
||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
{$mode delphi}
|
{$mode delphi}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sew }
|
{ %OPT=-Sew -vw }
|
||||||
{ this should generate no warning }
|
{ this should generate no warning }
|
||||||
|
|
||||||
{$mode tp}
|
{$mode tp}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sew }
|
{ %OPT=-Sew -vw }
|
||||||
|
|
||||||
unit tw10736;
|
unit tw10736;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Cr -Sew }
|
{ %opt=-Cr -Sew -vw }
|
||||||
|
|
||||||
var
|
var
|
||||||
a: PtrUInt;
|
a: PtrUInt;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sew -Oodfa }
|
{ %OPT=-Sew -vw -Oodfa }
|
||||||
{ %NORUN }
|
{ %NORUN }
|
||||||
{$mode objfpc}
|
{$mode objfpc}
|
||||||
function Test(a: integer): boolean;
|
function Test(a: integer): boolean;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sew -Oodfa }
|
{ %OPT=-Sew -vw -Oodfa }
|
||||||
{ %NORUN }
|
{ %NORUN }
|
||||||
{$mode objfpc}
|
{$mode objfpc}
|
||||||
function Test(a: integer): boolean;
|
function Test(a: integer): boolean;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sew -Oodfa }
|
{ %OPT=-Sew -vw -Oodfa }
|
||||||
{ %NORUN }
|
{ %NORUN }
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sew -Oodfa }
|
{ %OPT=-Sew -vw -Oodfa }
|
||||||
{ %norun }
|
{ %norun }
|
||||||
{$mode objfpc}
|
{$mode objfpc}
|
||||||
procedure GiveMe(out i: integer);
|
procedure GiveMe(out i: integer);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sew }
|
{ %OPT=-Sew -vw }
|
||||||
{ %fail }
|
{ %fail }
|
||||||
|
|
||||||
unit tw12050a;
|
unit tw12050a;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sew }
|
{ %OPT=-Sew -vw }
|
||||||
|
|
||||||
unit tw12050b;
|
unit tw12050b;
|
||||||
{$mode macpas}
|
{$mode macpas}
|
||||||
|
16
tests/webtbs/tw12076.pp
Normal file
16
tests/webtbs/tw12076.pp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{ %opt=-vw -Sew }
|
||||||
|
{ %norun }
|
||||||
|
{$mode macpas}
|
||||||
|
program nowarnings;
|
||||||
|
var
|
||||||
|
p: Pointer;
|
||||||
|
offs: PtrInt;
|
||||||
|
a: array[ 1..100] of integer;
|
||||||
|
begin
|
||||||
|
{$warnings on}
|
||||||
|
p:= @a;
|
||||||
|
offs:= SizeOf(integer);
|
||||||
|
{$warnings off}
|
||||||
|
PtrUInt(p):=PtrInt(p) + offs;
|
||||||
|
{$warnings on}
|
||||||
|
end.
|
@ -1,5 +1,5 @@
|
|||||||
{ %norun }
|
{ %norun }
|
||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
procedure test(a: longint);
|
procedure test(a: longint);
|
||||||
var
|
var
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
{ Source provided for Free Pascal Bug Report 1948 }
|
{ Source provided for Free Pascal Bug Report 1948 }
|
||||||
{ Submitted by "Sergey Kosarevsky" on 2002-04-27 }
|
{ Submitted by "Sergey Kosarevsky" on 2002-04-27 }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sew }
|
{ %OPT=-Sew -vw }
|
||||||
{ Source provided for Free Pascal Bug Report 2307 }
|
{ Source provided for Free Pascal Bug Report 2307 }
|
||||||
{ Submitted by "Sergey Kosarevsky" on 2003-01-03 }
|
{ Submitted by "Sergey Kosarevsky" on 2003-01-03 }
|
||||||
{ e-mail: netsurfer@au.ru }
|
{ e-mail: netsurfer@au.ru }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sen }
|
{ %OPT=-Sen -vn }
|
||||||
|
|
||||||
{ Source provided for Free Pascal Bug Report 2425 }
|
{ Source provided for Free Pascal Bug Report 2425 }
|
||||||
{ Submitted by "Marco van de Voort" on 2003-03-18 }
|
{ Submitted by "Marco van de Voort" on 2003-03-18 }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sew }
|
{ %OPT=-Sew -vw }
|
||||||
|
|
||||||
{ Source provided for Free Pascal Bug Report 2435 }
|
{ Source provided for Free Pascal Bug Report 2435 }
|
||||||
{ Submitted by "Louis Jean-Richard" on 2003-03-24 }
|
{ Submitted by "Louis Jean-Richard" on 2003-03-24 }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sew }
|
{ %OPT=-Sew -vw }
|
||||||
|
|
||||||
{ Source provided for Free Pascal Bug Report 2438 }
|
{ Source provided for Free Pascal Bug Report 2438 }
|
||||||
{ Submitted by "Armin Diehl" on 2003-03-25 }
|
{ Submitted by "Armin Diehl" on 2003-03-25 }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sew }
|
{ %OPT=-Sew -vw }
|
||||||
|
|
||||||
{ Source provided for Free Pascal Bug Report 2710 }
|
{ Source provided for Free Pascal Bug Report 2710 }
|
||||||
{ Submitted by "Micha Nelissen" on 2003-10-04 }
|
{ Submitted by "Micha Nelissen" on 2003-10-04 }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Sen }
|
{ %opt=-Sen -vn }
|
||||||
|
|
||||||
Var B:Longint;
|
Var B:Longint;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
{ Source provided for Free Pascal Bug Report 2815 }
|
{ Source provided for Free Pascal Bug Report 2815 }
|
||||||
{ Submitted by "Mattias Gaertner" on 2003-11-30 }
|
{ Submitted by "Mattias Gaertner" on 2003-11-30 }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Sen }
|
{ %opt=-Sen -vn }
|
||||||
|
|
||||||
{ Source provided for Free Pascal Bug Report 2817 }
|
{ Source provided for Free Pascal Bug Report 2817 }
|
||||||
{ Submitted by "Mattias Gaertner" on 2003-11-30 }
|
{ Submitted by "Mattias Gaertner" on 2003-11-30 }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
{ Source provided for Free Pascal Bug Report 2832 }
|
{ Source provided for Free Pascal Bug Report 2832 }
|
||||||
{ Submitted by "Mattias Gaertner" on 2003-12-05 }
|
{ Submitted by "Mattias Gaertner" on 2003-12-05 }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
{ Source provided for Free Pascal Bug Report 2841 }
|
{ Source provided for Free Pascal Bug Report 2841 }
|
||||||
{ Submitted by "Mattias Gaertner" on 2003-12-09 }
|
{ Submitted by "Mattias Gaertner" on 2003-12-09 }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
type
|
type
|
||||||
PUI32 = ^Longword;
|
PUI32 = ^Longword;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
{$ifdef fpc}{$mode objfpc}{$endif}
|
{$ifdef fpc}{$mode objfpc}{$endif}
|
||||||
{$M+}
|
{$M+}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
{ Source provided for Free Pascal Bug Report 3364 }
|
{ Source provided for Free Pascal Bug Report 3364 }
|
||||||
{ Submitted by "Sergey Kosarevsky" on 2004-10-22 }
|
{ Submitted by "Sergey Kosarevsky" on 2004-10-22 }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sew }
|
{ %OPT=-Sew -vw }
|
||||||
|
|
||||||
{ Source provided for Free Pascal Bug Report 3490 }
|
{ Source provided for Free Pascal Bug Report 3490 }
|
||||||
{ Submitted by "Tomas Hajny" on 2004-12-29 }
|
{ Submitted by "Tomas Hajny" on 2004-12-29 }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
(*$WEAKPACKAGEUNIT*)
|
(*$WEAKPACKAGEUNIT*)
|
||||||
(*$HPPEMIT '#include "some_include.h"' *)
|
(*$HPPEMIT '#include "some_include.h"' *)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
{ Source provided for Free Pascal Bug Report 3669 }
|
{ Source provided for Free Pascal Bug Report 3669 }
|
||||||
{ Submitted by "Mattias Gaertner" on 2005-02-19 }
|
{ Submitted by "Mattias Gaertner" on 2005-02-19 }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
{ Source provided for Free Pascal Bug Report 3952 }
|
{ Source provided for Free Pascal Bug Report 3952 }
|
||||||
{ Submitted by "Ivo Steinmann" on 2005-05-08 }
|
{ Submitted by "Ivo Steinmann" on 2005-05-08 }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %OPT=-Sew }
|
{ %OPT=-Sew -vw }
|
||||||
|
|
||||||
{ Source provided for Free Pascal Bug Report 3970 }
|
{ Source provided for Free Pascal Bug Report 3970 }
|
||||||
{ Submitted by "Yiannis Dondos" on 2005-05-15 }
|
{ Submitted by "Yiannis Dondos" on 2005-05-15 }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
{ Source provided for Free Pascal Bug Report 4006 }
|
{ Source provided for Free Pascal Bug Report 4006 }
|
||||||
{ Submitted by "Torsten Kildal" on 2005-05-23 }
|
{ Submitted by "Torsten Kildal" on 2005-05-23 }
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ %target=win32 }
|
{ %target=win32 }
|
||||||
{ %OPT=-Sew }
|
{ %OPT=-Sew -vw }
|
||||||
|
|
||||||
uses
|
uses
|
||||||
windows;
|
windows;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Sen }
|
{ %opt=-Sen -vn }
|
||||||
|
|
||||||
{ Source provided for Free Pascal Bug Report 4068 }
|
{ Source provided for Free Pascal Bug Report 4068 }
|
||||||
{ Submitted by "David Butler" on 2005-06-12 }
|
{ Submitted by "David Butler" on 2005-06-12 }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
{$A+}
|
{$A+}
|
||||||
{$A-}
|
{$A-}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
{$W+}
|
{$W+}
|
||||||
{$W-}
|
{$W-}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ %NORUN }
|
{ %NORUN }
|
||||||
{ %OPT=-Seh }
|
{ %OPT=-Seh -vh }
|
||||||
|
|
||||||
program aFP211r; { false hints on varrec }
|
program aFP211r; { false hints on varrec }
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ %norun }
|
{ %norun }
|
||||||
{ %OPT=-Sen }
|
{ %OPT=-Sen -vn }
|
||||||
|
|
||||||
unit tw5100;
|
unit tw5100;
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ %norun }
|
{ %norun }
|
||||||
{ %OPT=-Sen }
|
{ %OPT=-Sen -vn }
|
||||||
{ %fail }
|
{ %fail }
|
||||||
|
|
||||||
unit tw5100a;
|
unit tw5100a;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Seh }
|
{ %opt=-Seh -vh }
|
||||||
|
|
||||||
{$mode delphi}
|
{$mode delphi}
|
||||||
program TestMismatch;
|
program TestMismatch;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Sehw -S2 }
|
{ %opt=-Sehw -vwh -S2 }
|
||||||
|
|
||||||
type myclass=class(TObject)
|
type myclass=class(TObject)
|
||||||
procedure myproc();
|
procedure myproc();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ %cpu=i386 }
|
{ %cpu=i386 }
|
||||||
{ %target=go32v2,linux,freebsd,win32}
|
{ %target=go32v2,linux,freebsd,win32}
|
||||||
{ %opt=-Sew }
|
{ %opt=-Sew -vw }
|
||||||
|
|
||||||
{$mode delphi}
|
{$mode delphi}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Sen }
|
{ %opt=-Sen -vn }
|
||||||
program notusedbug;
|
program notusedbug;
|
||||||
|
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Oodfa -Sew }
|
{ %opt=-Oodfa -Sew -vw }
|
||||||
{ %norun }
|
{ %norun }
|
||||||
{$IFDEF FPC}
|
{$IFDEF FPC}
|
||||||
{$mode delphi}
|
{$mode delphi}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-Sen }
|
{ %opt=-Sen -vn }
|
||||||
{$mode delphi}
|
{$mode delphi}
|
||||||
|
|
||||||
function calclength1(const s1: shortstring): integer;
|
function calclength1(const s1: shortstring): integer;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ %opt=-O2 -Sew }
|
{ %opt=-O2 -Sew -vw }
|
||||||
|
|
||||||
{$inline on}
|
{$inline on}
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user