Browse Source

* typed address only used for @ and addr() that are parsed

peter 22 years ago
parent
commit
353219a928
3 changed files with 19 additions and 5 deletions
  1. 6 3
      compiler/nmem.pas
  2. 5 1
      compiler/node.pas
  3. 8 1
      compiler/pexpr.pas

+ 6 - 3
compiler/nmem.pas

@@ -432,14 +432,14 @@ implementation
                ((tloadnode(hp).symtableentry.typ=absolutesym) and
                ((tloadnode(hp).symtableentry.typ=absolutesym) and
                 tabsolutesym(tloadnode(hp).symtableentry).absseg) then
                 tabsolutesym(tloadnode(hp).symtableentry).absseg) then
              begin
              begin
-               if not(cs_typed_addresses in aktlocalswitches) then
+               if not(nf_typedaddr in flags) then
                  resulttype:=voidfarpointertype
                  resulttype:=voidfarpointertype
                else
                else
                  resulttype.setdef(tpointerdef.createfar(left.resulttype));
                  resulttype.setdef(tpointerdef.createfar(left.resulttype));
              end
              end
             else
             else
              begin
              begin
-               if not(cs_typed_addresses in aktlocalswitches) then
+               if not(nf_typedaddr in flags) then
                  resulttype:=voidpointertype
                  resulttype:=voidpointertype
                else
                else
                  resulttype.setdef(tpointerdef.create(left.resulttype));
                  resulttype.setdef(tpointerdef.create(left.resulttype));
@@ -957,7 +957,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.72  2003-11-10 22:02:52  peter
+  Revision 1.73  2003-11-29 14:33:13  peter
+    * typed address only used for @ and addr() that are parsed
+
+  Revision 1.72  2003/11/10 22:02:52  peter
     * cross unit inlining fixed
     * cross unit inlining fixed
 
 
   Revision 1.71  2003/11/05 14:18:03  marco
   Revision 1.71  2003/11/05 14:18:03  marco

+ 5 - 1
compiler/node.pas

@@ -217,6 +217,7 @@ interface
 
 
          { taddrnode }
          { taddrnode }
          nf_procvarload,
          nf_procvarload,
+         nf_typedaddr,
 
 
          { tvecnode }
          { tvecnode }
          nf_memindex,
          nf_memindex,
@@ -1089,7 +1090,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.76  2003-11-23 17:38:48  peter
+  Revision 1.77  2003-11-29 14:33:13  peter
+    * typed address only used for @ and addr() that are parsed
+
+  Revision 1.76  2003/11/23 17:38:48  peter
     * mark nodes that are copies
     * mark nodes that are copies
 
 
   Revision 1.75  2003/11/12 15:48:27  peter
   Revision 1.75  2003/11/12 15:48:27  peter

+ 8 - 1
compiler/pexpr.pas

@@ -518,6 +518,8 @@ implementation
               in_args:=true;
               in_args:=true;
               p1:=comp_expr(true);
               p1:=comp_expr(true);
               p1:=caddrnode.create(p1);
               p1:=caddrnode.create(p1);
+              if cs_typed_addresses in aktlocalswitches then
+                include(p1.flags,nf_typedaddr);
               consume(_RKLAMMER);
               consume(_RKLAMMER);
               statement_syssym:=p1;
               statement_syssym:=p1;
             end;
             end;
@@ -2143,6 +2145,8 @@ implementation
                 end;
                 end;
                got_addrn:=false;
                got_addrn:=false;
                p1:=caddrnode.create(p1);
                p1:=caddrnode.create(p1);
+               if cs_typed_addresses in aktlocalswitches then
+                 include(p1.flags,nf_typedaddr);
                { Store the procvar that we are expecting, the
                { Store the procvar that we are expecting, the
                  addrn will use the information to find the correct
                  addrn will use the information to find the correct
                  procdef or it will return an error }
                  procdef or it will return an error }
@@ -2478,7 +2482,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.140  2003-11-10 19:11:39  peter
+  Revision 1.141  2003-11-29 14:33:13  peter
+    * typed address only used for @ and addr() that are parsed
+
+  Revision 1.140  2003/11/10 19:11:39  peter
     * check paralength instead of assigned(left)
     * check paralength instead of assigned(left)
 
 
   Revision 1.139  2003/11/07 15:58:32  florian
   Revision 1.139  2003/11/07 15:58:32  florian