diff --git a/compiler/scandir.inc b/compiler/scandir.inc index 101523772c..f451366886 100644 --- a/compiler/scandir.inc +++ b/compiler/scandir.inc @@ -587,10 +587,12 @@ const state:=current_scanner^.readstate; if (sw<>cs_localnone) and (state in ['-','+']) then begin + if not localswitcheschanged then + nextaktlocalswitches:=aktlocalswitches; if state='-' then - nextaktlocalswitches:=aktlocalswitches-[sw] + nextaktlocalswitches:=nextaktlocalswitches-[sw] else - nextaktlocalswitches:=aktlocalswitches+[sw]; + nextaktlocalswitches:=nextaktlocalswitches+[sw]; localswitcheschanged:=true; end; end; @@ -1333,7 +1335,10 @@ const { $Log$ - Revision 1.79 2000-05-03 14:36:58 pierre + Revision 1.80 2000-05-09 21:31:50 pierre + * fix problem when modifying several local switches in a row + + Revision 1.79 2000/05/03 14:36:58 pierre * fix for tests/test/testrang.pp bug Revision 1.78 2000/04/14 11:16:10 pierre diff --git a/compiler/switches.pas b/compiler/switches.pas index 2033492486..bfe7e50c8b 100644 --- a/compiler/switches.pas +++ b/compiler/switches.pas @@ -89,10 +89,12 @@ begin illegalsw : Message1(scan_w_illegal_switch,'$'+switch); unsupportedsw : Message1(scan_w_unsupported_switch,'$'+switch); localsw : begin + if not localswitcheschanged then + nextaktlocalswitches:=aktlocalswitches; if state='+' then - nextaktlocalswitches:=aktlocalswitches+[tlocalswitch(setsw)] + nextaktlocalswitches:=nextaktlocalswitches+[tlocalswitch(setsw)] else - nextaktlocalswitches:=aktlocalswitches-[tlocalswitch(setsw)]; + nextaktlocalswitches:=nextaktlocalswitches-[tlocalswitch(setsw)]; localswitcheschanged:=true; { Message for linux which has global checking only } if (switch='S') and ( @@ -172,7 +174,10 @@ end; end. { $Log$ - Revision 1.27 2000-05-03 14:36:58 pierre + Revision 1.28 2000-05-09 21:31:50 pierre + * fix problem when modifying several local switches in a row + + Revision 1.27 2000/05/03 14:36:58 pierre * fix for tests/test/testrang.pp bug Revision 1.26 2000/02/09 13:23:04 peter