mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-04 18:58:30 +02:00
* flush pending local switch changes before evaluating ifopt
(mantis #10350) git-svn-id: trunk@9413 -
This commit is contained in:
parent
742ff35c48
commit
24f8249f36
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -7799,6 +7799,7 @@ tests/webtbs/tw10210.pp svneol=native#text/plain
|
||||
tests/webtbs/tw10224.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1023.pp svneol=native#text/plain
|
||||
tests/webtbs/tw10320.pp svneol=native#text/plain
|
||||
tests/webtbs/tw10350.pp svneol=native#text/plain
|
||||
tests/webtbs/tw10371.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1041.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1044.pp svneol=native#text/plain
|
||||
|
@ -487,6 +487,11 @@ implementation
|
||||
|
||||
procedure dir_ifopt;
|
||||
begin
|
||||
if localswitcheschanged then
|
||||
begin
|
||||
current_settings.localswitches:=nextlocalswitches;
|
||||
localswitcheschanged:=false;
|
||||
end;
|
||||
current_scanner.ifpreprocstack(pp_ifopt,@opt_check,scan_c_ifopt_found);
|
||||
end;
|
||||
|
||||
|
15
tests/webtbs/tw10350.pp
Normal file
15
tests/webtbs/tw10350.pp
Normal file
@ -0,0 +1,15 @@
|
||||
{ %norun }
|
||||
|
||||
program TestLocal;
|
||||
var i: longint;
|
||||
begin
|
||||
{$R+}
|
||||
{$ifopt R+}
|
||||
{$define local_RangeCheck}
|
||||
{$R-}
|
||||
{$endif}
|
||||
i:= longword( -1);
|
||||
{$ifdef local_RangeCheck}
|
||||
{$R+}
|
||||
{$endif}
|
||||
end.
|
Loading…
Reference in New Issue
Block a user