mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-05-31 05:42:34 +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/tw11862a.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/tw12365a.cfg 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/tw12051.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/tw12202.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;
|
||||
end;
|
||||
|
||||
tpendingstate = record
|
||||
nextverbositystr : string;
|
||||
nextlocalswitches : tlocalswitches;
|
||||
nextverbosityfullswitch: longint;
|
||||
verbosityfullswitched,
|
||||
localswitcheschanged : boolean;
|
||||
end;
|
||||
|
||||
|
||||
var
|
||||
{ specified inputfile }
|
||||
inputfilepath : string;
|
||||
@ -252,9 +261,7 @@ interface
|
||||
init_settings,
|
||||
current_settings : tsettings;
|
||||
|
||||
nextlocalswitches : tlocalswitches;
|
||||
localswitcheschanged : boolean;
|
||||
|
||||
pendingstate : tpendingstate;
|
||||
{ Memory sizes }
|
||||
heapsize,
|
||||
stacksize,
|
||||
|
@ -298,6 +298,7 @@ interface
|
||||
resultdefderef : tderef;
|
||||
fileinfo : tfileposinfo;
|
||||
localswitches : tlocalswitches;
|
||||
verbosity : longint;
|
||||
optinfo : poptinfo;
|
||||
constructor create(t:tnodetype);
|
||||
{ this constructor is only for creating copies of class }
|
||||
@ -466,7 +467,7 @@ interface
|
||||
implementation
|
||||
|
||||
uses
|
||||
cutils,verbose,ppu,
|
||||
cutils,verbose,ppu,comphook,
|
||||
symconst,
|
||||
nutils,nflw,
|
||||
defutil;
|
||||
@ -695,6 +696,7 @@ implementation
|
||||
{ save local info }
|
||||
fileinfo:=current_filepos;
|
||||
localswitches:=current_settings.localswitches;
|
||||
verbosity:=status.verbosity;
|
||||
resultdef:=nil;
|
||||
flags:=[];
|
||||
end;
|
||||
@ -712,6 +714,7 @@ implementation
|
||||
blocktype:=tblock_type(ppufile.getbyte);
|
||||
ppufile.getposinfo(fileinfo);
|
||||
ppufile.getsmallset(localswitches);
|
||||
verbosity:=ppufile.getlongint;
|
||||
ppufile.getderef(resultdefderef);
|
||||
ppufile.getsmallset(flags);
|
||||
{ updated by firstpass }
|
||||
@ -726,6 +729,7 @@ implementation
|
||||
ppufile.putbyte(byte(block_type));
|
||||
ppufile.putposinfo(fileinfo);
|
||||
ppufile.putsmallset(localswitches);
|
||||
ppufile.putlongint(verbosity);
|
||||
ppufile.putderef(resultdefderef);
|
||||
ppufile.putsmallset(flags);
|
||||
end;
|
||||
@ -887,6 +891,7 @@ implementation
|
||||
p.resultdef:=resultdef;
|
||||
p.fileinfo:=fileinfo;
|
||||
p.localswitches:=localswitches;
|
||||
p.verbosity:=verbosity;
|
||||
{ p.list:=list; }
|
||||
result:=p;
|
||||
end;
|
||||
|
@ -41,7 +41,7 @@ implementation
|
||||
fksysutl,
|
||||
{$ENDIF}
|
||||
cutils,cclasses,
|
||||
globtype,version,tokens,systems,globals,verbose,
|
||||
globtype,version,tokens,systems,globals,verbose,switches,
|
||||
symbase,symtable,symsym,
|
||||
finput,fmodule,fppu,
|
||||
aasmbase,aasmtai,aasmdata,
|
||||
@ -309,11 +309,7 @@ implementation
|
||||
oldparse_only:=parse_only;
|
||||
{ save akt... state }
|
||||
{ handle the postponed case first }
|
||||
if localswitcheschanged then
|
||||
begin
|
||||
current_settings.localswitches:=nextlocalswitches;
|
||||
localswitcheschanged:=false;
|
||||
end;
|
||||
flushpendingswitchesstate;
|
||||
oldcurrent_filepos:=current_filepos;
|
||||
old_settings:=current_settings;
|
||||
end;
|
||||
|
@ -41,7 +41,7 @@ interface
|
||||
implementation
|
||||
|
||||
uses
|
||||
globtype,systems,cclasses,
|
||||
globtype,comphook,systems,cclasses,
|
||||
cutils,globals,
|
||||
procinfo,
|
||||
cgbase,symdef
|
||||
@ -61,6 +61,7 @@ implementation
|
||||
var
|
||||
oldcodegenerror : boolean;
|
||||
oldlocalswitches : tlocalswitches;
|
||||
oldverbosity : longint;
|
||||
oldpos : tfileposinfo;
|
||||
hp : tnode;
|
||||
begin
|
||||
@ -69,9 +70,11 @@ implementation
|
||||
oldcodegenerror:=codegenerror;
|
||||
oldpos:=current_filepos;
|
||||
oldlocalswitches:=current_settings.localswitches;
|
||||
oldverbosity:=status.verbosity;
|
||||
codegenerror:=false;
|
||||
current_filepos:=p.fileinfo;
|
||||
current_settings.localswitches:=p.localswitches;
|
||||
status.verbosity:=p.verbosity;
|
||||
hp:=p.pass_typecheck;
|
||||
{ should the node be replaced? }
|
||||
if assigned(hp) then
|
||||
@ -84,6 +87,7 @@ implementation
|
||||
end;
|
||||
current_settings.localswitches:=oldlocalswitches;
|
||||
current_filepos:=oldpos;
|
||||
status.verbosity:=oldverbosity;
|
||||
if codegenerror then
|
||||
begin
|
||||
include(p.flags,nf_error);
|
||||
@ -115,6 +119,7 @@ implementation
|
||||
oldcodegenerror : boolean;
|
||||
oldlocalswitches : tlocalswitches;
|
||||
oldpos : tfileposinfo;
|
||||
oldverbosity: longint;
|
||||
hp : tnode;
|
||||
begin
|
||||
if (nf_pass1_done in p.flags) then
|
||||
@ -124,17 +129,17 @@ implementation
|
||||
oldcodegenerror:=codegenerror;
|
||||
oldpos:=current_filepos;
|
||||
oldlocalswitches:=current_settings.localswitches;
|
||||
oldverbosity:=status.verbosity;
|
||||
codegenerror:=false;
|
||||
current_filepos:=p.fileinfo;
|
||||
current_settings.localswitches:=p.localswitches;
|
||||
status.verbosity:=p.verbosity;
|
||||
{ checks make always a call }
|
||||
if ([cs_check_range,cs_check_overflow,cs_check_stack] * current_settings.localswitches <> []) then
|
||||
include(current_procinfo.flags,pi_do_call);
|
||||
{ determine the resultdef if not done }
|
||||
if (p.resultdef=nil) then
|
||||
begin
|
||||
current_filepos:=p.fileinfo;
|
||||
current_settings.localswitches:=p.localswitches;
|
||||
hp:=p.pass_typecheck;
|
||||
{ should the node be replaced? }
|
||||
if assigned(hp) then
|
||||
@ -152,15 +157,11 @@ implementation
|
||||
if p.resultdef=nil then
|
||||
p.resultdef:=generrordef;
|
||||
end;
|
||||
current_settings.localswitches:=oldlocalswitches;
|
||||
current_filepos:=oldpos;
|
||||
codegenerror:=codegenerror or oldcodegenerror;
|
||||
end;
|
||||
if not(nf_error in p.flags) then
|
||||
begin
|
||||
{ first pass }
|
||||
current_filepos:=p.fileinfo;
|
||||
current_settings.localswitches:=p.localswitches;
|
||||
hp:=p.pass_1;
|
||||
{ should the node be replaced? }
|
||||
if assigned(hp) then
|
||||
@ -197,6 +198,7 @@ implementation
|
||||
codegenerror:=codegenerror or oldcodegenerror;
|
||||
current_settings.localswitches:=oldlocalswitches;
|
||||
current_filepos:=oldpos;
|
||||
status.verbosity:=oldverbosity;
|
||||
end
|
||||
else
|
||||
codegenerror:=true;
|
||||
|
@ -43,7 +43,7 @@ type
|
||||
{$endif Test_Double_checksum}
|
||||
|
||||
const
|
||||
CurrentPPUVersion = 92;
|
||||
CurrentPPUVersion = 93;
|
||||
|
||||
{ buffer sizes }
|
||||
maxentrysize = 1024;
|
||||
|
@ -41,11 +41,17 @@ implementation
|
||||
rabase;
|
||||
|
||||
const
|
||||
localswitchesstackmax = 20;
|
||||
switchesstatestackmax = 20;
|
||||
|
||||
type
|
||||
tsavedswitchesstate = record
|
||||
localsw: tlocalswitches;
|
||||
verbosity: longint;
|
||||
end;
|
||||
|
||||
var
|
||||
localswitchesstack: array[0..localswitchesstackmax] of tlocalswitches;
|
||||
localswitchesstackpos: Integer;
|
||||
switchesstatestack: array[0..switchesstatestackmax] of tsavedswitchesstate;
|
||||
switchesstatestackpos: Integer;
|
||||
|
||||
{*****************************************************************************
|
||||
Helpers
|
||||
@ -68,7 +74,7 @@ implementation
|
||||
begin
|
||||
{ support ON/OFF }
|
||||
state:=current_scanner.ReadState;
|
||||
SetVerbosity(flag+state);
|
||||
recordpendingverbosityswitch(flag,state);
|
||||
end;
|
||||
|
||||
|
||||
@ -93,15 +99,7 @@ implementation
|
||||
begin
|
||||
state:=current_scanner.readstate;
|
||||
if (sw<>cs_localnone) and (state in ['-','+']) then
|
||||
begin
|
||||
if not localswitcheschanged then
|
||||
nextlocalswitches:=current_settings.localswitches;
|
||||
if state='-' then
|
||||
exclude(nextlocalswitches,sw)
|
||||
else
|
||||
include(nextlocalswitches,sw);
|
||||
localswitcheschanged:=true;
|
||||
end;
|
||||
recordpendinglocalswitch(sw,state);
|
||||
end;
|
||||
|
||||
procedure do_localswitchdefault(sw:tlocalswitch);
|
||||
@ -110,23 +108,7 @@ implementation
|
||||
begin
|
||||
state:=current_scanner.readstatedefault;
|
||||
if (sw<>cs_localnone) and (state in ['-','+','*']) then
|
||||
begin
|
||||
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;
|
||||
recordpendinglocalswitch(sw,state);
|
||||
end;
|
||||
|
||||
|
||||
@ -945,16 +927,12 @@ implementation
|
||||
procedure dir_pop;
|
||||
|
||||
begin
|
||||
if localswitchesstackpos < 1 then
|
||||
if switchesstatestackpos < 1 then
|
||||
Message(scan_e_too_many_pop);
|
||||
|
||||
if not localswitcheschanged then
|
||||
nextlocalswitches:=current_settings.localswitches;
|
||||
|
||||
Dec(localswitchesstackpos);
|
||||
nextlocalswitches:= localswitchesstack[localswitchesstackpos];
|
||||
|
||||
localswitcheschanged:=true;
|
||||
Dec(switchesstatestackpos);
|
||||
recordpendinglocalfullswitch(switchesstatestack[switchesstatestackpos].localsw);
|
||||
recordpendingverbosityfullswitch(switchesstatestack[switchesstatestackpos].verbosity);
|
||||
end;
|
||||
|
||||
procedure dir_profile;
|
||||
@ -970,17 +948,14 @@ implementation
|
||||
procedure dir_push;
|
||||
|
||||
begin
|
||||
if localswitchesstackpos > localswitchesstackmax then
|
||||
if switchesstatestackpos > switchesstatestackmax then
|
||||
Message(scan_e_too_many_push);
|
||||
|
||||
if localswitcheschanged then
|
||||
begin
|
||||
current_settings.localswitches:=nextlocalswitches;
|
||||
localswitcheschanged:=false;
|
||||
end;
|
||||
flushpendingswitchesstate;
|
||||
|
||||
localswitchesstack[localswitchesstackpos]:= current_settings.localswitches;
|
||||
Inc(localswitchesstackpos);
|
||||
switchesstatestack[switchesstatestackpos].localsw:= current_settings.localswitches;
|
||||
switchesstatestack[switchesstatestackpos].verbosity:=status.verbosity;
|
||||
Inc(switchesstatestackpos);
|
||||
end;
|
||||
|
||||
procedure dir_rangechecks;
|
||||
@ -1434,5 +1409,5 @@ implementation
|
||||
end;
|
||||
|
||||
begin
|
||||
localswitchesstackpos:= 0;
|
||||
switchesstatestackpos:= 0;
|
||||
end.
|
||||
|
@ -332,11 +332,7 @@ implementation
|
||||
if b then
|
||||
begin
|
||||
{ resolve all postponed switch changes }
|
||||
if localswitcheschanged then
|
||||
begin
|
||||
current_settings.localswitches:=nextlocalswitches;
|
||||
localswitcheschanged:=false;
|
||||
end;
|
||||
flushpendingswitchesstate;
|
||||
|
||||
HandleModeSwitches(changeinit);
|
||||
|
||||
@ -526,11 +522,7 @@ implementation
|
||||
|
||||
procedure dir_ifopt;
|
||||
begin
|
||||
if localswitcheschanged then
|
||||
begin
|
||||
current_settings.localswitches:=nextlocalswitches;
|
||||
localswitcheschanged:=false;
|
||||
end;
|
||||
flushpendingswitchesstate;
|
||||
current_scanner.ifpreprocstack(pp_ifopt,@opt_check,scan_c_ifopt_found);
|
||||
end;
|
||||
|
||||
@ -3200,11 +3192,7 @@ In case not, the value returned can be arbitrary.
|
||||
label
|
||||
exit_label;
|
||||
begin
|
||||
if localswitcheschanged then
|
||||
begin
|
||||
current_settings.localswitches:=nextlocalswitches;
|
||||
localswitcheschanged:=false;
|
||||
end;
|
||||
flushpendingswitchesstate;
|
||||
|
||||
{ record tokens? }
|
||||
if allowrecordtoken and
|
||||
|
@ -25,14 +25,23 @@ unit switches;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
globtype;
|
||||
|
||||
procedure HandleSwitch(switch,state:char);
|
||||
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
|
||||
uses
|
||||
globtype,systems,cpuinfo,
|
||||
globals,verbose,fmodule;
|
||||
systems,cpuinfo,
|
||||
globals,verbose,comphook,
|
||||
fmodule;
|
||||
|
||||
{****************************************************************************
|
||||
Main Switches Parsing
|
||||
@ -149,15 +158,7 @@ begin
|
||||
unsupportedsw :
|
||||
Message1(scan_w_unsupported_switch,'$'+switch);
|
||||
localsw :
|
||||
begin
|
||||
if not localswitcheschanged then
|
||||
nextlocalswitches:=current_settings.localswitches;
|
||||
if state='+' then
|
||||
include(nextlocalswitches,tlocalswitch(setsw))
|
||||
else
|
||||
exclude(nextlocalswitches,tlocalswitch(setsw));
|
||||
localswitcheschanged:=true;
|
||||
end;
|
||||
recordpendinglocalswitch(tlocalswitch(setsw),state);
|
||||
modulesw :
|
||||
begin
|
||||
if current_module.in_global then
|
||||
@ -256,4 +257,64 @@ begin
|
||||
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.
|
||||
|
@ -579,26 +579,29 @@ implementation
|
||||
'W':
|
||||
begin
|
||||
v:=v or V_Warning;
|
||||
if status.errorwarning then
|
||||
inc(status.errorcount)
|
||||
else
|
||||
inc(status.countWarnings);
|
||||
if CheckVerbosity(V_Warning) then
|
||||
if status.errorwarning then
|
||||
inc(status.errorcount)
|
||||
else
|
||||
inc(status.countWarnings);
|
||||
end;
|
||||
'N' :
|
||||
begin
|
||||
v:=v or V_Note;
|
||||
if status.errornote then
|
||||
inc(status.errorcount)
|
||||
else
|
||||
inc(status.countNotes);
|
||||
if CheckVerbosity(V_Note) then
|
||||
if status.errornote then
|
||||
inc(status.errorcount)
|
||||
else
|
||||
inc(status.countNotes);
|
||||
end;
|
||||
'H' :
|
||||
begin
|
||||
v:=v or V_Hint;
|
||||
if status.errorhint then
|
||||
inc(status.errorcount)
|
||||
else
|
||||
inc(status.countHints);
|
||||
if CheckVerbosity(V_Hint) then
|
||||
if status.errorhint then
|
||||
inc(status.errorcount)
|
||||
else
|
||||
inc(status.countHints);
|
||||
end;
|
||||
'I' :
|
||||
v:=v or V_Info;
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ %FAIL }
|
||||
{ %OPT=-Sew }
|
||||
{ %OPT=-Sew -vw }
|
||||
|
||||
{ Old file: tbf0351.pp }
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ %fail }
|
||||
{ %OPT=-Sew }
|
||||
{ %OPT=-Sew -vw }
|
||||
{$calling }
|
||||
|
||||
begin
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %OPT=-Sew }
|
||||
{ %OPT=-Sew -vw }
|
||||
{ %fail }
|
||||
|
||||
{$T-}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %OPT=-Sew }
|
||||
{ %OPT=-Sew -vw }
|
||||
{ %fail }
|
||||
|
||||
{$T-}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
{ %fail }
|
||||
|
||||
{$ifdef fpc}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ %fail }
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
|
||||
var
|
||||
a: longint;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ %norun }
|
||||
{ %fail }
|
||||
{ %opt=-Sen }
|
||||
{ %opt=-Sen -vn }
|
||||
|
||||
type
|
||||
tr = record
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ %norun }
|
||||
{ %fail }
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
|
||||
type
|
||||
tr = record
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
{ %fail }
|
||||
{$mode objfpc}
|
||||
procedure p(out o);
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ %fail }
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
|
||||
procedure test;
|
||||
var
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %OPT= -Sen }
|
||||
{ %OPT= -Sen -vn }
|
||||
|
||||
{ Old file: tbs0317.pp }
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %OPT=-Sen }
|
||||
{ %OPT=-Sen -vn }
|
||||
|
||||
{ Old file: tbs0339.pp }
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{%OPT=-Sew}
|
||||
{%OPT=-Sew -vw}
|
||||
{$mode objfpc}
|
||||
|
||||
function f: longint;
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %OPT=-Seh }
|
||||
{ %OPT=-Seh -vh }
|
||||
program test;
|
||||
uses math;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %OPT=-Sen }
|
||||
{ %OPT=-Sen -vn }
|
||||
|
||||
{$mode objfpc}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ %norun }
|
||||
{ %opt=-Sen }
|
||||
{ %opt=-Sen -vn }
|
||||
type
|
||||
TRegister = (
|
||||
TRegisterLowEnum := Low(longint),
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %OPT=-Sew }
|
||||
{ %OPT=-Sew -vw }
|
||||
|
||||
{$T-}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
|
||||
{$ifdef fpc}
|
||||
{$mode delphi}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ %norun }
|
||||
{ %opt=-Sen }
|
||||
{ %opt=-Sen -vn }
|
||||
|
||||
type
|
||||
tr = record
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
|
||||
{$mode objfpc}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ %norun }
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
|
||||
procedure t;
|
||||
var
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-vw -Sew }
|
||||
|
||||
var
|
||||
p : pointer;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ %target=linux,solaris,freebsd,win32 }
|
||||
{ %fail }
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-vw -Sew }
|
||||
|
||||
{ just some random non-darwin targets }
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ %recompile }
|
||||
{ %fail }
|
||||
{ %opt=-Sew -Cn }
|
||||
{ %opt=-vw -Sew -Cn }
|
||||
|
||||
uses umainnam;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %OPT=-Sew }
|
||||
{ %OPT=-Sew -vw }
|
||||
{ %fail }
|
||||
{ this should generate a warning
|
||||
because s is not initialized }
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %OPT=-Sew }
|
||||
{ %OPT=-Sew -vw }
|
||||
{ %fail }
|
||||
{ this should generate a warning
|
||||
because s is not initialized }
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %OPT=-Sew }
|
||||
{ %OPT=-Sew -vw }
|
||||
{ %fail }
|
||||
procedure p;experimental;
|
||||
begin
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ %fail }
|
||||
{ %opt=-Se1w2 }
|
||||
{ %opt=-Se1w2 -vw }
|
||||
|
||||
var
|
||||
pc: pchar;
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %OPT=-Sew -Oodfa }
|
||||
{ %OPT=-Sew -vw -Oodfa }
|
||||
{ %NORUN }
|
||||
{ %fail }
|
||||
{$mode objfpc}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %OPT=-Sew -Oodfa }
|
||||
{ %OPT=-Sew -vw -Oodfa }
|
||||
{ %NORUN }
|
||||
{ %fail }
|
||||
{$mode objfpc}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %OPT=-Sew -Oodfa }
|
||||
{ %OPT=-Sew -vw -Oodfa }
|
||||
{ %FAIL }
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %OPT=-Sew -Oodfa }
|
||||
{ %OPT=-Sew -vw -Oodfa }
|
||||
{ %fail }
|
||||
{$mode objfpc}
|
||||
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 }
|
||||
|
||||
{ Source provided for Free Pascal Bug Report 2209 }
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ %fail }
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
|
||||
{ Source provided for Free Pascal Bug Report 2752 }
|
||||
{ Submitted by "Micha" on 2003-10-26 }
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ %fail }
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
|
||||
{ Source provided for Free Pascal Bug Report 3553 }
|
||||
{ Submitted by "Naj Kejah" on 2005-01-15 }
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ %fail }
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
|
||||
procedure p;
|
||||
var
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ %fail }
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
|
||||
var
|
||||
a : array[0..32] of byte;
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ %fail }
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
|
||||
{ Source provided for Free Pascal Bug Report 3643 }
|
||||
{ Submitted by "Naj Kejah" on 2005-02-08 }
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ %fail }
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
|
||||
{ Source provided for Free Pascal Bug Report 4139 }
|
||||
{ Submitted by "Christian Iversen" on 2005-06-29 }
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ %fail }
|
||||
{ %OPT=-CO -Sewnh -vh}
|
||||
{ %OPT=-CO -Sewnh -vwnh }
|
||||
{ changed -Seh to -Sewnh because -Cr option
|
||||
changes the hint into a warning PM }
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %opt=-Oodfa -Sew }
|
||||
{ %opt=-Oodfa -Sew -vw }
|
||||
{ %fail }
|
||||
{$IFDEF FPC}
|
||||
{$mode delphi}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %opt=-Oodfa -Sew }
|
||||
{ %opt=-Oodfa -Sew -vw }
|
||||
{ %fail }
|
||||
{$IFDEF FPC}
|
||||
{$mode delphi}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ %fail }
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
|
||||
{$mode delphi}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %OPT=-Sew }
|
||||
{ %OPT=-Sew -vw }
|
||||
{ this should generate no warning }
|
||||
|
||||
{$mode tp}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %OPT=-Sew }
|
||||
{ %OPT=-Sew -vw }
|
||||
|
||||
unit tw10736;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %opt=-Cr -Sew }
|
||||
{ %opt=-Cr -Sew -vw }
|
||||
|
||||
var
|
||||
a: PtrUInt;
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %OPT=-Sew -Oodfa }
|
||||
{ %OPT=-Sew -vw -Oodfa }
|
||||
{ %NORUN }
|
||||
{$mode objfpc}
|
||||
function Test(a: integer): boolean;
|
||||
@ -10,4 +10,4 @@ begin
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
||||
end.
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %OPT=-Sew -Oodfa }
|
||||
{ %OPT=-Sew -vw -Oodfa }
|
||||
{ %NORUN }
|
||||
{$mode objfpc}
|
||||
function Test(a: integer): boolean;
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %OPT=-Sew -Oodfa }
|
||||
{ %OPT=-Sew -vw -Oodfa }
|
||||
{ %NORUN }
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %OPT=-Sew -Oodfa }
|
||||
{ %OPT=-Sew -vw -Oodfa }
|
||||
{ %norun }
|
||||
{$mode objfpc}
|
||||
procedure GiveMe(out i: integer);
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %OPT=-Sew }
|
||||
{ %OPT=-Sew -vw }
|
||||
{ %fail }
|
||||
|
||||
unit tw12050a;
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %OPT=-Sew }
|
||||
{ %OPT=-Sew -vw }
|
||||
|
||||
unit tw12050b;
|
||||
{$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 }
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
|
||||
procedure test(a: longint);
|
||||
var
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
|
||||
{ Source provided for Free Pascal Bug Report 1948 }
|
||||
{ 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 }
|
||||
{ Submitted by "Sergey Kosarevsky" on 2003-01-03 }
|
||||
{ e-mail: netsurfer@au.ru }
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %OPT=-Sen }
|
||||
{ %OPT=-Sen -vn }
|
||||
|
||||
{ Source provided for Free Pascal Bug Report 2425 }
|
||||
{ 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 }
|
||||
{ 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 }
|
||||
{ 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 }
|
||||
{ Submitted by "Micha Nelissen" on 2003-10-04 }
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %opt=-Sen }
|
||||
{ %opt=-Sen -vn }
|
||||
|
||||
Var B:Longint;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
|
||||
{ Source provided for Free Pascal Bug Report 2815 }
|
||||
{ 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 }
|
||||
{ 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 }
|
||||
{ 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 }
|
||||
{ Submitted by "Mattias Gaertner" on 2003-12-09 }
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
|
||||
type
|
||||
PUI32 = ^Longword;
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
|
||||
{$ifdef fpc}{$mode objfpc}{$endif}
|
||||
{$M+}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
|
||||
{ Source provided for Free Pascal Bug Report 3364 }
|
||||
{ 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 }
|
||||
{ Submitted by "Tomas Hajny" on 2004-12-29 }
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
|
||||
(*$WEAKPACKAGEUNIT*)
|
||||
(*$HPPEMIT '#include "some_include.h"' *)
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
|
||||
{ Source provided for Free Pascal Bug Report 3669 }
|
||||
{ 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 }
|
||||
{ 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 }
|
||||
{ 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 }
|
||||
{ Submitted by "Torsten Kildal" on 2005-05-23 }
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ %target=win32 }
|
||||
{ %OPT=-Sew }
|
||||
{ %OPT=-Sew -vw }
|
||||
|
||||
uses
|
||||
windows;
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %opt=-Sen }
|
||||
{ %opt=-Sen -vn }
|
||||
|
||||
{ Source provided for Free Pascal Bug Report 4068 }
|
||||
{ Submitted by "David Butler" on 2005-06-12 }
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
|
||||
{$A+}
|
||||
{$A-}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
|
||||
{$W+}
|
||||
{$W-}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ %NORUN }
|
||||
{ %OPT=-Seh }
|
||||
{ %OPT=-Seh -vh }
|
||||
|
||||
program aFP211r; { false hints on varrec }
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ %norun }
|
||||
{ %OPT=-Sen }
|
||||
{ %OPT=-Sen -vn }
|
||||
|
||||
unit tw5100;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ %norun }
|
||||
{ %OPT=-Sen }
|
||||
{ %OPT=-Sen -vn }
|
||||
{ %fail }
|
||||
|
||||
unit tw5100a;
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %opt=-Seh }
|
||||
{ %opt=-Seh -vh }
|
||||
|
||||
{$mode delphi}
|
||||
program TestMismatch;
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %opt=-Sehw -S2 }
|
||||
{ %opt=-Sehw -vwh -S2 }
|
||||
|
||||
type myclass=class(TObject)
|
||||
procedure myproc();
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ %cpu=i386 }
|
||||
{ %target=go32v2,linux,freebsd,win32}
|
||||
{ %opt=-Sew }
|
||||
{ %opt=-Sew -vw }
|
||||
|
||||
{$mode delphi}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %opt=-Sen }
|
||||
{ %opt=-Sen -vn }
|
||||
program notusedbug;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %opt=-Oodfa -Sew }
|
||||
{ %opt=-Oodfa -Sew -vw }
|
||||
{ %norun }
|
||||
{$IFDEF FPC}
|
||||
{$mode delphi}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %opt=-Sen }
|
||||
{ %opt=-Sen -vn }
|
||||
{$mode delphi}
|
||||
|
||||
function calclength1(const s1: shortstring): integer;
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ %opt=-O2 -Sew }
|
||||
{ %opt=-O2 -Sew -vw }
|
||||
|
||||
{$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