Преглед на файлове

* show name of procedure/function called with too few parameters

git-svn-id: trunk@5522 -
Jonas Maebe преди 18 години
родител
ревизия
9e60d6791d
променени са 6 файла, в които са добавени 233 реда и са изтрити 231 реда
  1. 1 1
      compiler/msg/errore.msg
  2. 1 1
      compiler/msgidx.inc
  3. 213 213
      compiler/msgtxt.inc
  4. 3 3
      compiler/ncal.pas
  5. 6 4
      compiler/ninl.pas
  6. 9 9
      compiler/pinline.pas

+ 1 - 1
compiler/msg/errore.msg

@@ -414,7 +414,7 @@ parser_n_object_has_no_vmt=03023_N_The object "$1" has no VMT
 parser_e_illegal_parameter_list=03024_E_Illegal parameter list
 % You are calling a function with parameters that are of a different type than
 % the declared parameters of the function.
-parser_e_wrong_parameter_size=03026_E_Wrong number of parameters specified
+parser_e_wrong_parameter_size=03026_E_Wrong number of parameters specified for call to "$1"
 % There is an error in the parameter list of the function or procedure,
 % the number of parameters is not correct.
 parser_e_overloaded_no_procedure=03027_E_overloaded identifier "$1" isn't a function

+ 1 - 1
compiler/msgidx.inc

@@ -704,7 +704,7 @@ const
   option_info=11024;
   option_help_pages=11025;
 
-  MsgTxtSize = 41751;
+  MsgTxtSize = 41768;
 
   MsgIdxMax : array[1..20] of longint=(
     24,82,226,79,62,47,102,22,135,60,

Файловите разлики са ограничени, защото са твърде много
+ 213 - 213
compiler/msgtxt.inc


+ 3 - 3
compiler/ncal.pas

@@ -1799,7 +1799,7 @@ implementation
                         internalerror(200402261);
                       if not assigned(tparavarsym(procdefinition.paras[paraidx]).defaultconstsym) then
                         begin
-                          CGMessage(parser_e_wrong_parameter_size);
+                          CGMessage1(parser_e_wrong_parameter_size,symtableprocentry.realname);
                           goto errorexit;
                         end;
                       dec(paraidx);
@@ -1828,7 +1828,7 @@ implementation
                 begin
                    if assigned(pt) then
                      current_filepos:=pt.fileinfo;
-                   CGMessage(parser_e_wrong_parameter_size);
+                   CGMessage1(parser_e_wrong_parameter_size,symtableprocentry.realname);
                    goto errorexit;
                 end;
            end
@@ -1881,7 +1881,7 @@ implementation
                             begin
                               if assigned(left) then
                                current_filepos:=left.fileinfo;
-                              CGMessage(parser_e_wrong_parameter_size);
+                              CGMessage1(parser_e_wrong_parameter_size,symtableprocentry.realname);
                               symtableprocentry.write_parameter_lists(nil);
                             end;
                         end;

+ 6 - 4
compiler/ninl.pas

@@ -148,7 +148,7 @@ implementation
         if not assigned(left) or
            (left.nodetype <> callparan) then
           begin
-            CGMessage(parser_e_wrong_parameter_size);
+            CGMessage1(parser_e_wrong_parameter_size,'Str');
             exit;
           end;
 
@@ -165,7 +165,7 @@ implementation
         if (source=dest) or
            (cpf_is_colon_para in tcallparanode(dest).callparaflags) then
           begin
-            CGMessage(parser_e_wrong_parameter_size);
+            CGMessage1(parser_e_wrong_parameter_size,'Str');
             exit;
           end;
 
@@ -307,6 +307,8 @@ implementation
       const
         procnames: array[boolean,boolean] of string[11] =
           (('write_text_','read_text_'),('typed_write','typed_read'));
+        procnamesdisplay: array[boolean] of string[5] =
+          ('Write','Read');
 
       var
         filepara,
@@ -477,7 +479,7 @@ implementation
             { check for "no parameters" (you need at least one extra para for typed files) }
             if not assigned(para) then
               begin
-                CGMessage(parser_e_wrong_parameter_size);
+                CGMessage1(parser_e_wrong_parameter_size,procnamesdisplay[do_read]);
                 found_error := true;
               end;
 
@@ -905,7 +907,7 @@ implementation
         if not(assigned(left)) or
            not(assigned(tcallparanode(left).right)) then
          begin
-           CGMessage(parser_e_wrong_parameter_size);
+           CGMessage1(parser_e_wrong_parameter_size,'Val');
            exit;
          end;
 

+ 9 - 9
compiler/pinline.pas

@@ -470,7 +470,7 @@ implementation
         consume(_RKLAMMER);
         if not assigned(paras) then
          begin
-           CGMessage(parser_e_wrong_parameter_size);
+           CGMessage1(parser_e_wrong_parameter_size,'SetLength');
            exit;
          end;
 
@@ -489,7 +489,7 @@ implementation
          end;
         if dims=0 then
          begin
-           CGMessage(parser_e_wrong_parameter_size);
+           CGMessage1(parser_e_wrong_parameter_size,'SetLength');
            paras.free;
            exit;
          end;
@@ -523,7 +523,7 @@ implementation
                 begin
                   if not(is_dynamic_array(def)) then
                     begin
-                      CGMessage(parser_e_wrong_parameter_size);
+                      CGMessage1(parser_e_wrong_parameter_size,'SetLength');
                       break;
                     end;
                   dec(counter);
@@ -597,7 +597,7 @@ implementation
         consume(_RKLAMMER);
         if not assigned(paras) then
          begin
-           CGMessage(parser_e_wrong_parameter_size);
+           CGMessage1(parser_e_wrong_parameter_size,'Initialize');
            exit;
          end;
 
@@ -605,7 +605,7 @@ implementation
         { 2 arguments? }
         if assigned(ppn.right) then
          begin
-           CGMessage(parser_e_wrong_parameter_size);
+           CGMessage1(parser_e_wrong_parameter_size,'Initialize');
            paras.free;
            exit;
          end;
@@ -635,7 +635,7 @@ implementation
         consume(_RKLAMMER);
         if not assigned(paras) then
          begin
-           CGMessage(parser_e_wrong_parameter_size);
+           CGMessage1(parser_e_wrong_parameter_size,'Finalize');
            exit;
          end;
 
@@ -647,7 +647,7 @@ implementation
            { 3 arguments is invalid }
            if assigned(destppn.right) then
             begin
-              CGMessage(parser_e_wrong_parameter_size);
+              CGMessage1(parser_e_wrong_parameter_size,'Finalize');
               paras.free;
               exit;
             end;
@@ -694,7 +694,7 @@ implementation
         consume(_RKLAMMER);
         if not assigned(paras) then
          begin
-           CGMessage(parser_e_wrong_parameter_size);
+           CGMessage1(parser_e_wrong_parameter_size,'Copy');
            exit;
          end;
 
@@ -728,7 +728,7 @@ implementation
             { Only allow 1 or 3 arguments }
             if (counter<>1) and (counter<>3) then
              begin
-               CGMessage(parser_e_wrong_parameter_size);
+               CGMessage1(parser_e_wrong_parameter_size,'Copy');
                exit;
              end;
 

Някои файлове не бяха показани, защото твърде много файлове са промени