فهرست منبع

* changed unknown align/enum warings into errors and also improved them

git-svn-id: trunk@582 -
olle 20 سال پیش
والد
کامیت
438f229f52
4فایلهای تغییر یافته به همراه248 افزوده شده و 246 حذف شده
  1. 7 5
      compiler/msg/errore.msg
  2. 3 3
      compiler/msgidx.inc
  3. 230 232
      compiler/msgtxt.inc
  4. 8 6
      compiler/scandir.pas

+ 7 - 5
compiler/msg/errore.msg

@@ -167,12 +167,14 @@ scan_f_cannot_open_input=02012_F_Can't open file "$1"
 scan_f_cannot_open_includefile=02013_F_Can't open include file "$1"
 % \fpc cannot find the source file you specified in a \var{\{\$include ..\}}
 % statement.
-scan_w_only_pack_records=02015_W_Records fields can be aligned to 1,2,4,8,16 or 32 bytes only
-% You are specifying the \var{\{\$PACKRECORDS n\} } with an illegal value for
-% \var{n}. Only 1, 2, 4, 8, 16 and 32 are valid in this case.
-scan_w_only_pack_enum=02016_W_Enumerated can be saved in 1,2 or 4 bytes only
+scan_e_illegal_pack_records=02015_E_Illegal record alignment specifier "$1"
+% You are specifying the \var{\{\$PACKRECORDS n\} } or \var{\{\$ALIGN n\} }
+% with an illegal value for \var{n}. For $PACKRECORDS valid alignments are 1, 2, 4, 8, 16, 32, C,
+% NORMAL, DEFAULT, and for $ALIGN valid alignment are 1, 2, 4, 8, 16, 32, ON,
+% OFF. Under mode MacPas $ALIGN also supports MAC68K, POWER and RESET.
+scan_e_illegal_pack_enum=02016_E_Illegal enum minimum-size specifier "$1"
 % You are specifying the \var{\{\$PACKENUM n\}} with an illegal value for
-% \var{n}. Only 1,2 or 4 are valid in this case.
+% \var{n}. Only 1,2,4, NORMAL or DEFAULT are valid here.
 scan_e_endif_expected=02017_E_$ENDIF expected for $1 $2 defined in $3 line $4
 % Your conditional compilation statements are unbalanced.
 scan_e_preproc_syntax_error=02018_E_Syntax error while parsing a conditional compiling expression

+ 3 - 3
compiler/msgidx.inc

@@ -30,8 +30,8 @@ const
   scan_e_illegal_char_const=02011;
   scan_f_cannot_open_input=02012;
   scan_f_cannot_open_includefile=02013;
-  scan_w_only_pack_records=02015;
-  scan_w_only_pack_enum=02016;
+  scan_e_illegal_pack_records=02015;
+  scan_e_illegal_pack_enum=02016;
   scan_e_endif_expected=02017;
   scan_e_preproc_syntax_error=02018;
   scan_e_error_in_preproc_expr=02019;
@@ -657,7 +657,7 @@ const
   option_info=11024;
   option_help_pages=11025;
 
-  MsgTxtSize = 38799;
+  MsgTxtSize = 38772;
 
   MsgIdxMax : array[1..20] of longint=(
     19,72,215,59,59,46,100,20,35,60,

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 230 - 232
compiler/msgtxt.inc


+ 8 - 6
compiler/scandir.pas

@@ -161,9 +161,11 @@ implementation
                  aktpackrecords:=4
                else if (hs='RESET') then
                  aktpackrecords:=0
+               else
+                 Message1(scan_e_illegal_pack_records,hs);
              end
            else
-             Message(scan_w_only_pack_records);
+             Message1(scan_e_illegal_pack_records,hs);
          end
         else
          begin
@@ -175,7 +177,7 @@ implementation
             16 : aktpackrecords:=16;
             32 : aktpackrecords:=32;
            else
-            Message(scan_w_only_pack_records);
+            Message1(scan_e_illegal_pack_records,hs);
            end;
          end;
       end;
@@ -697,7 +699,7 @@ implementation
            if (hs='NORMAL') or (hs='DEFAULT') then
             aktpackenum:=4
            else
-            Message(scan_w_only_pack_enum);
+            Message1(scan_e_illegal_pack_enum, hs);
          end
         else
          begin
@@ -706,7 +708,7 @@ implementation
             2 : aktpackenum:=2;
             4 : aktpackenum:=4;
            else
-            Message(scan_w_only_pack_enum);
+            Message1(scan_e_illegal_pack_enum, pattern);
            end;
          end;
       end;
@@ -726,7 +728,7 @@ implementation
             if (hs='NORMAL') or (hs='DEFAULT') then
              aktpackrecords:=0
            else
-            Message(scan_w_only_pack_records);
+            Message1(scan_e_illegal_pack_records,hs);
          end
         else
          begin
@@ -738,7 +740,7 @@ implementation
             16 : aktpackrecords:=16;
             32 : aktpackrecords:=32;
            else
-            Message(scan_w_only_pack_records);
+            Message1(scan_e_illegal_pack_records,pattern);
            end;
          end;
       end;

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است