소스 검색

* fix problem when modifying several local switches in a row

pierre 25 년 전
부모
커밋
1d982ffbf6
2개의 변경된 파일16개의 추가작업 그리고 6개의 파일을 삭제
  1. 8 3
      compiler/scandir.inc
  2. 8 3
      compiler/switches.pas

+ 8 - 3
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

+ 8 - 3
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