Browse Source

+ added flag tcnf_proc_2_procvar_get_offset_only

git-svn-id: trunk@38680 -
nickysn 7 years ago
parent
commit
6929af07b7
2 changed files with 5 additions and 1 deletions
  1. 3 1
      compiler/ncnv.pas
  2. 2 0
      compiler/nmem.pas

+ 3 - 1
compiler/ncnv.pas

@@ -41,7 +41,9 @@ interface
             take the address of a _near_ procedure as a void pointer (which the
             take the address of a _near_ procedure as a void pointer (which the
             @ operator does in TP mode), but not as a procvar (in that case the
             @ operator does in TP mode), but not as a procvar (in that case the
             procedure must be far). }
             procedure must be far). }
-          tcnf_proc_2_procvar_2_voidpointer
+          tcnf_proc_2_procvar_2_voidpointer,
+          { proc_2_procvar, generated internally by Ofs() }
+          tcnf_proc_2_procvar_get_offset_only
        );
        );
        ttypeconvnodeflags = set of ttypeconvnodeflag;
        ttypeconvnodeflags = set of ttypeconvnodeflag;
 
 

+ 2 - 0
compiler/nmem.pas

@@ -566,6 +566,8 @@ implementation
                 left:=ctypeconvnode.create_proc_to_procvar(left);
                 left:=ctypeconvnode.create_proc_to_procvar(left);
                 if need_conv_to_voidptr then
                 if need_conv_to_voidptr then
                   include(ttypeconvnode(left).convnodeflags,tcnf_proc_2_procvar_2_voidpointer);
                   include(ttypeconvnode(left).convnodeflags,tcnf_proc_2_procvar_2_voidpointer);
+                if anf_ofs in addrnodeflags then
+                  include(ttypeconvnode(left).convnodeflags,tcnf_proc_2_procvar_get_offset_only);
                 left.fileinfo:=fileinfo;
                 left.fileinfo:=fileinfo;
                 typecheckpass(left);
                 typecheckpass(left);
               end;
               end;