瀏覽代碼

* use sp_internal flag to silence unused internal variable

peter 21 年之前
父節點
當前提交
f967fa5f74
共有 3 個文件被更改,包括 23 次插入11 次删除
  1. 11 7
      compiler/pdecsub.pas
  2. 6 2
      compiler/symconst.pas
  3. 6 2
      compiler/symsym.pas

+ 11 - 7
compiler/pdecsub.pas

@@ -354,7 +354,7 @@ implementation
         srsym   : tsym;
         hs1 : string;
         varspez : Tvarspez;
-        tdefaultvalue : tconstsym;
+        defaultvalue : tconstsym;
         defaultrequired : boolean;
         old_object_option : tsymoptions;
         currparast : tparasymtable;
@@ -389,7 +389,7 @@ implementation
               end
           else
               varspez:=vs_value;
-          tdefaultvalue:=nil;
+          defaultvalue:=nil;
           tt.reset;
           { read identifiers and insert with error type }
           sc.reset;
@@ -461,9 +461,10 @@ implementation
                       if assigned(vs.listnext) then
                         Message(parser_e_default_value_only_one_para);
                       { prefix 'def' to the parameter name }
-                      tdefaultvalue:=ReadConstant('$def'+vs.name,vs.fileinfo);
-                      if assigned(tdefaultvalue) then
-                       tprocdef(pd).parast.insert(tdefaultvalue);
+                      defaultvalue:=ReadConstant('$def'+vs.name,vs.fileinfo);
+                      include(defaultvalue.symoptions,sp_internal);
+                      if assigned(defaultvalue) then
+                       tprocdef(pd).parast.insert(defaultvalue);
                       defaultrequired:=true;
                     end
                    else
@@ -501,7 +502,7 @@ implementation
                    paramanager.push_addr_param(varspez,tt.def,pd.proccalloption) then
                   include(vs.varoptions,vo_regable);
               end;
-             pd.concatpara(nil,tt,vs,tdefaultvalue,false);
+             pd.concatpara(nil,tt,vs,defaultvalue,false);
              vs:=tvarsym(vs.listnext);
            end;
         until not try_to_consume(_SEMICOLON);
@@ -2139,7 +2140,10 @@ const
 end.
 {
   $Log$
-  Revision 1.162  2004-02-13 15:41:24  peter
+  Revision 1.163  2004-02-20 21:54:47  peter
+    * use sp_internal flag to silence unused internal variable
+
+  Revision 1.162  2004/02/13 15:41:24  peter
     * overload directive checking for methods is now done
       when the vmt is generated
 

+ 6 - 2
compiler/symconst.pas

@@ -120,7 +120,8 @@ type
     sp_hint_platform,
     sp_hint_library,
     sp_hint_unimplemented,
-    sp_has_overloaded
+    sp_has_overloaded,
+    sp_internal  { internal symbol, not reported as unused }
   );
   tsymoptions=set of tsymoption;
 
@@ -400,7 +401,10 @@ initialization
 end.
 {
   $Log$
-  Revision 1.74  2004-01-21 14:22:00  florian
+  Revision 1.75  2004-02-20 21:54:47  peter
+    * use sp_internal flag to silence unused internal variable
+
+  Revision 1.74  2004/01/21 14:22:00  florian
     + reintroduce implemented
 
   Revision 1.73  2003/12/19 22:08:44  daniel

+ 6 - 2
compiler/symsym.pas

@@ -1012,7 +1012,7 @@ implementation
         search_procdef_binary_operator:=nil;
         bestpd:=nil;
         bestlev:=0;
-        cdoptions:=[];  
+        cdoptions:=[];
         { variants arguments must match exact, don't allow conversion to variants that
           will then allow things like enum->string, because enum->variant is available
           and select the operator variant->string }
@@ -2323,6 +2323,7 @@ implementation
         prefix : array[trttitype] of string[5]=('$rtti','$init');
       begin
         inherited create(prefix[rt]+n);
+        include(symoptions,sp_internal);
         typ:=rttisym;
         lab:=nil;
         rttityp:=rt;
@@ -2366,7 +2367,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.158  2004-02-13 15:42:21  peter
+  Revision 1.159  2004-02-20 21:54:47  peter
+    * use sp_internal flag to silence unused internal variable
+
+  Revision 1.158  2004/02/13 15:42:21  peter
     * compare_defs_ext has now a options argument
     * fixes for variants