Browse Source

* mereg from fixes-0_99_12 branch

pierre 26 years ago
parent
commit
2083621f3e
1 changed files with 13 additions and 8 deletions
  1. 13 8
      compiler/pexpr.pas

+ 13 - 8
compiler/pexpr.pas

@@ -112,6 +112,8 @@ unit pexpr;
     procedure check_tp_procvar(var p : ptree);
     procedure check_tp_procvar(var p : ptree);
       var
       var
          p1 : ptree;
          p1 : ptree;
+         Store_valid : boolean;
+         
       begin
       begin
          if (m_tp_procvar in aktmodeswitches) and
          if (m_tp_procvar in aktmodeswitches) and
 {            (not afterassignment) and }
 {            (not afterassignment) and }
@@ -119,7 +121,10 @@ unit pexpr;
             (p^.treetype in [loadn]) then
             (p^.treetype in [loadn]) then
             begin
             begin
                { support if procvar then for tp7 and many other expression like this }
                { support if procvar then for tp7 and many other expression like this }
+               Store_valid:=Must_be_valid;
+               Must_be_valid:=false;
                firstpass(p);
                firstpass(p);
+               Must_be_valid:=Store_valid;
                if p^.resulttype^.deftype=procvardef then
                if p^.resulttype^.deftype=procvardef then
                  begin
                  begin
                     p1:=gencallnode(nil,nil);
                     p1:=gencallnode(nil,nil);
@@ -838,6 +843,9 @@ unit pexpr;
                   (not ((m_tp in aktmodeswitches) and
                   (not ((m_tp in aktmodeswitches) and
                   (afterassignment or in_args))) then
                   (afterassignment or in_args))) then
                  begin
                  begin
+                    if ((pvarsym(sym)=opsym) and
+                       ((p^.flags and pi_operator)<>0)) then
+                       inc(opsym^.refs);
                     if ((pvarsym(sym)=opsym) and
                     if ((pvarsym(sym)=opsym) and
                        ((p^.flags and pi_operator)<>0)) then
                        ((p^.flags and pi_operator)<>0)) then
                        inc(opsym^.refs);
                        inc(opsym^.refs);
@@ -2027,20 +2035,17 @@ unit pexpr;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.115  1999-06-17 13:19:52  pierre
-   * merged from 0_99_12 branch
+  Revision 1.116  1999-06-26 00:24:53  pierre
+   * mereg from fixes-0_99_12 branch
+
+  Revision 1.112.2.4  1999/06/26 00:22:30  pierre
+   * wrong warnings in -So mode suppressed
 
 
   Revision 1.112.2.3  1999/06/17 12:51:44  pierre
   Revision 1.112.2.3  1999/06/17 12:51:44  pierre
    * changed is_assignment_overloaded into
    * changed is_assignment_overloaded into
       function assignment_overloaded : pprocdef
       function assignment_overloaded : pprocdef
       to allow overloading of assignment with only different result type
       to allow overloading of assignment with only different result type
 
 
-  Revision 1.114  1999/06/15 18:58:33  peter
-    * merged
-
-  Revision 1.113  1999/06/13 22:41:05  peter
-    * merged from fixes
-
   Revision 1.112.2.2  1999/06/15 18:54:52  peter
   Revision 1.112.2.2  1999/06/15 18:54:52  peter
     * more procvar fixes
     * more procvar fixes