Przeglądaj źródła

Merged revisions 6907-6908,6916-6917,6921-6922,6924-6928,6930,6932,6937,6943-6946,6952,6954,6956,6974,6976,6991,6996-6998,7002,7007,7016,7020-7021,7033,7037,7040,7042,7045,7068-7069,7075-7079,7087,7094,7098-7099,7101,7103,7109,7115-7119,7128,7136-7137,7139,7150,7160-7162,7175,7179,7184,7186,7190-7195,7198,7202,7205-7206,7208-7217,7220-7222,7225-7228,7230-7231,7233,7239-7241,7244,7246,7263,7275,7277,7279-7281,7285,7288-7289,7291-7293,7296,7300,7303,7308,7310,7318,7340-7341,7343,7345,7350,7372-7373,7375-7376,7379,7381,7383-7388,7391-7392,7400,7404-7406,7411,7422,7425,7436,7441-7442,7444-7446,7450,7456,7463,7467,7475,7479,7486,7498,7504,7506-7509,7511,7522,7527,7534-7537 via svnmerge from
http://svn.freepascal.org/svn/fpc/trunk

........
r6907 | hajny | 2007-03-17 23:10:02 +0100 (Sat, 17 Mar 2007) | 1 line

* comment about sec_fpc extended to cover current meaning
........
r6917 | tom_at_work | 2007-03-18 16:50:49 +0100 (Sun, 18 Mar 2007) | 1 line

* improve compilation on ppc64/linux
........
r6926 | peter | 2007-03-18 22:35:42 +0100 (Sun, 18 Mar 2007) | 2 lines

* removed invalid code from proc_get_importname where the result could be empty
........
r6932 | jonas | 2007-03-19 14:45:16 +0100 (Mon, 19 Mar 2007) | 2 lines

* fixed typos (MacOS -> Mac OS)
........
r6937 | hajny | 2007-03-20 01:49:20 +0100 (Tue, 20 Mar 2007) | 1 line

* OS/2 compilation fixes (not completely finished yet)
........
r6991 | hajny | 2007-03-25 01:21:12 +0100 (Sun, 25 Mar 2007) | 1 line

* align Comment behaviour with Msg2Comment
........
r6998 | daniel | 2007-03-25 16:38:45 +0200 (Sun, 25 Mar 2007) | 2 lines

* Fix indentation.
........
r7184 | florian | 2007-04-28 21:35:51 +0200 (Sat, 28 Apr 2007) | 3 lines

* convert extended to double when passing it to automation dispatchers
* fix code generation for automation dispatching of doubles
........
r7186 | hajny | 2007-04-29 11:48:53 +0200 (Sun, 29 Apr 2007) | 1 line

* added missing word in message explanation
........
r7231 | florian | 2007-05-01 14:47:06 +0200 (Tue, 01 May 2007) | 3 lines

* release buf already when closing the file
* better error handling
........
r7308 | jonas | 2007-05-11 11:17:01 +0200 (Fri, 11 May 2007) | 3 lines

* a loadsize of 1 can never cause alignment problems in subsetref
routines
........
r7350 | tom_at_work | 2007-05-15 21:03:55 +0200 (Tue, 15 May 2007) | 1 line

* 6 bit sized members of packed records can never be split over more than 2 bytes too
........
r7446 | michael | 2007-05-24 09:42:39 +0200 (Thu, 24 May 2007) | 1 line

* Applied patch from Ido Kanner
........
r7498 | florian | 2007-05-28 17:59:17 +0200 (Mon, 28 May 2007) | 2 lines

- removed several ;;
........
r7511 | jonas | 2007-05-29 15:04:15 +0200 (Tue, 29 May 2007) | 2 lines

* fixed (harmless) range error
........
r7537 | jonas | 2007-05-31 17:07:48 +0200 (Thu, 31 May 2007) | 2 lines

* added missing "reserved" field to new code page files to fix warnings
........

git-svn-id: branches/fixes_2_2@8536 -

peter 18 lat temu
rodzic
commit
e834fad112

+ 6 - 1
compiler/aasmbase.pas

@@ -78,7 +78,12 @@ interface
          sec_debug_info,
          sec_debug_line,
          sec_debug_abbrev,
-         { ELF resources }
+         { Yury: "sec_fpc is intended for storing fpc specific data
+                  which must be recognized and processed specially by linker.
+                  Currently fpc version string, dummy links to stab sections
+                  and elf resources are stored in .fpc sections."
+                  "If special .fpc section cannot be used on some target,
+                  .text can be used instead." }
          sec_fpc,
          { Table of contents section }
          sec_toc,

+ 1 - 1
compiler/aasmtai.pas

@@ -2345,7 +2345,7 @@ implementation
 {$endif x86}
               ppufile.getdata(o.ref^.base,sizeof(Tregister));
               ppufile.getdata(o.ref^.index,sizeof(Tregister));
-              ppufile.getdata(o.ref^.refaddr,sizeof(o.ref^.refaddr));;
+              ppufile.getdata(o.ref^.refaddr,sizeof(o.ref^.refaddr));
               o.ref^.scalefactor:=ppufile.getbyte;
               o.ref^.offset:=ppufile.getaint;
               o.ref^.symbol:=ppufile.getasmsymbol;

+ 50 - 0
compiler/aggas.pas

@@ -82,6 +82,11 @@ interface
        end;
 
 
+      TAoutGNUAssembler=class(TGNUAssembler)
+        function sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;override;
+       end;
+
+
 implementation
 
     uses
@@ -1137,6 +1142,51 @@ implementation
       end;
 
 
+{****************************************************************************}
+{                       a.out/GNU Assembler writer                           }
+{****************************************************************************}
+
+    function TAoutGNUAssembler.sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;
+    const
+(* Translation table - replace unsupported section types with basic ones. *)
+        SecXTable: array[TAsmSectionType] of TAsmSectionType = (
+         sec_none,
+         sec_code,
+         sec_data,
+         sec_data (* sec_rodata *),
+         sec_bss,
+         sec_data (* sec_threadvar *),
+         { used for wince exception handling }
+         sec_code (* sec_pdata *),
+         { used for darwin import stubs }
+         sec_code (* sec_stub *),
+         { stabs }
+         sec_stab,sec_stabstr,
+         { win32 }
+         sec_data (* sec_idata2 *),
+         sec_data (* sec_idata4 *),
+         sec_data (* sec_idata5 *),
+         sec_data (* sec_idata6 *),
+         sec_data (* sec_idata7 *),
+         sec_data (* sec_edata *),
+         { C++ exception handling unwinding (uses dwarf) }
+         sec_eh_frame,
+         { dwarf }
+         sec_debug_frame,
+         sec_debug_info,
+         sec_debug_line,
+         sec_debug_abbrev,
+         { ELF resources (+ references to stabs debug information sections) }
+         sec_code (* sec_fpc *),
+         { Table of contents section }
+         sec_code (* sec_toc *),
+         sec_code (* sec_init *)
+        );
+      begin
+        Result := inherited SectionName (SecXTable [AType], AName, AOrder);
+      end;
+
+
 {****************************************************************************}
 {                        Abstract Instruction Writer                         }
 {****************************************************************************}

+ 1 - 1
compiler/arm/narmcnv.pas

@@ -130,7 +130,7 @@ implementation
         instr:=taicpu.op_reg_reg(A_FLT,location.register,left.location.register);
         if is_signed(left.resultdef) then
           begin
-            instr.oppostfix:=cgsize2fpuoppostfix[def_cgsize(resultdef)];;
+            instr.oppostfix:=cgsize2fpuoppostfix[def_cgsize(resultdef)];
             current_asmdata.CurrAsmList.concat(instr);
           end
         else

+ 2 - 1
compiler/arm/narmcon.pas

@@ -66,7 +66,8 @@ interface
         location_reset(location,LOC_CREFERENCE,def_cgsize(resultdef));
         lastlabel:=nil;
         realait:=floattype2ait[tfloatdef(resultdef).floattype];
-        hiloswapped:=is_double_hilo_swapped;
+        hiloswapped:=(current_settings.fputype in [fpu_fpa,fpu_fpa10,fpu_fpa11]) and
+          not(cs_fp_emulation in current_settings.moduleswitches);
         { const already used ? }
         if not assigned(lab_real) then
           begin

+ 1 - 1
compiler/cclasses.pas

@@ -1071,7 +1071,7 @@ procedure TFPHashList.Put(Index: Integer; Item: Pointer);
 begin
   if (Index < 0) or (Index >= FCount) then
     RaiseIndexError(Index);
-  FHashList^[Index].Data:=Item;;
+  FHashList^[Index].Data:=Item;
 end;
 
 

+ 6 - 4
compiler/cgobj.pas

@@ -749,7 +749,7 @@ implementation
         for rt:=low(rg) to high(rg) do
           begin
             if assigned(rg[rt]) then
-              rg[rt].extend_live_range_backwards := b;;
+              rg[rt].extend_live_range_backwards := b;
           end;
       end;
 
@@ -1154,9 +1154,11 @@ implementation
 
 {$if defined(cpurequiresproperalignment) and not defined(arm) and not(defined(sparc))}
         { may need to be split into several smaller loads/stores }
-        if intloadsize <> sref.ref.alignment then
-           internalerror(2006082011);
-{$endif cpurequiresproperalignment}
+        if (tf_requires_proper_alignment in target_info.flags) and
+           (intloadsize <> 1) and
+           (intloadsize <> sref.ref.alignment) then
+          internalerror(2006082011);
+{$endif not(defined(arm)) and not(defined(sparc))}
 
         if (intloadsize = 0) then
           internalerror(2006081310);

+ 1 - 1
compiler/cmsgs.pas

@@ -91,7 +91,7 @@ begin
           last:=i;
         end;
     end;
-  MsgReplace:=hs+copy(s,last+1,length(s)-last);;
+  MsgReplace:=hs+copy(s,last+1,length(s)-last);
 end;
 
 

+ 1 - 1
compiler/cutils.pas

@@ -277,7 +277,7 @@ implementation
              result := 1;
            { 10 bits can never be split over 3 bytes via 1-8-1, because it }
            { always starts at a multiple of 10 bits. Same for the others.  }
-           3,5,7,9,10,12,16:
+           3,5,6,7,9,10,12,16:
              result := 2;
   {$ifdef cpu64bit}
            { performance penalty for unaligned 8 byte access is much   }

+ 1 - 1
compiler/i386/csopt386.pas

@@ -2237,7 +2237,7 @@ begin
 {$endif noinstremove}
           begin
             p.optinfo := nil;
-            p := tai(p.next);;
+            p := tai(p.next);
           end;
     end;
 end;

+ 1 - 1
compiler/msg/errore.msg

@@ -1131,7 +1131,7 @@ parser_f_no_anonymous_specializations=03232_F_Anonymous generic specializations
 parser_e_initialized_not_for_external=03233_E_Cannot initialize variables declared as external
 % Variables declared as external can not be initialized with a default value.
 parser_e_illegal_function_result=03234_E_Illegal function result type
-% Some types like file types can not used as function result
+% Some types like file types can not be used as function result.
 parser_e_no_generics_as_types=03236_E_Generics without specialization can not be used as a type for a variable
 % Generics must be always specialized before being used as variable type
 % \end{description}

+ 19 - 15
compiler/msg/errorhe.msg

@@ -1,10 +1,10 @@
 #
 #   This file is part of the Free Pascal Compiler
-#   Copyright (c) 1999-2006 by the Free Pascal Development team
+#   Copyright (c) 1999-2007 by the Free Pascal Development team
 #
 #   Hebrew (CP1255) language file for Free Pascal Compiler
 #   Contributed by Ido Kanner <idokan at gmail.com> and Dotan Kamber <kamberd at yahoo.com>
-#   Based on errore.msg of SVN revision 6685
+#   Based on errore.msg of SVN revision 7423
 #
 #   See the file COPYING.FPC, included in this distribution,
 #   for details about the copyright.
@@ -348,8 +348,8 @@ scanner_e_illegal_warn_state=02079_E_
 scan_e_only_packset=02080_E_òøê ùì àøéæä ìà çå÷é
 % Only 0, 1, 2, 4, 8, DEFAULT and NORMAL are allowed as packset parameter
 scan_w_pic_ignored=02081_W_îúòìí îäåøàú PIC
-% Several targets like windows doesn't support and need the PIC directive so
-% it is ignored.
+% Several targets like windows do not support the PIC directive and need it to be
+% ignored.
 % \end{description}
 #
 # Parser
@@ -1023,7 +1023,7 @@ parser_e_goto_outside_proc=03201_E_
 % ...
 %
 % \end{verbatim}
-parser_f_too_complex_proc=03202_F_äùéâøä îñåáëú îéãé åãøùú ùéîåù ùì éåúø îéãé àåâøéí
+parser_f_too_complex_proc=03202_F_äùéâøä îñåáëú îéãé åãåøùú ùéîåù ùì àåâøéí øáéí îéãé
 % Your procedure body is too long for the compiler. You should split the
 % procedure into multiple smaller procedures.
 parser_e_illegal_expression=03203_E_áéèåé ìà çå÷é
@@ -1131,6 +1131,8 @@ parser_f_no_anonymous_specializations=03232_F_
 %   MyLinkedList: TMyLinkedList
 parser_e_initialized_not_for_external=03233_E_ìà ðéúï ìàúçì òøê áøéøú îçãì ìîùúðéí äîåâãøéí ëexternal
 % Variables declared as external can not be initialized with a default value.
+parser_e_illegal_function_result=03234_E_èéôåñ äçæøä ùì äôåð÷öéä àéðå çå÷é
+% Some types like file types can not be used as function result
 % \end{description}
 #
 # Type Checking
@@ -1251,8 +1253,9 @@ type_e_wrong_math_argument=04027_E_
 % The constant argument passed to a ln or sqrt function is out of
 % the definition range of these functions.
 type_e_no_addr_of_constant=04028_E_ìà ðéúï ì÷áì àú äëúåáú ùì ä÷áåò
-% It is not possible to get the address of a constant, because they
-% aren't stored in memory, you can try making it a typed constant.
+% It is not possible to get the address of a constant expression, because they
+% aren't stored in memory. You can try making it a typed constant. This error
+% can also be displayed if you try to pass a property to a var parameter.
 type_e_argument_cant_be_assigned=04029_E_ìà ðéúï ìäùéí àú äàøâåîðè
 % Only expressions which can be on the left side of an
 % assignment can be passed as call by reference argument
@@ -2348,9 +2351,6 @@ option_asm_forced=11022_W_
 % The assembler output selected can not generate
 % object files with the correct format. Therefore, the
 % default assembler for this target is used instead.
-option_confict_asm_debug=11041_W_ñåâ äôìè ùì äîàñó ùðáçø "$1" àéðå éëåì ìéöåø îéãò òáåø ðéôåé ùâéàåú. îáèì ðéôåé ùâéàåú
-% The assembler output selected can not generate
-% debugging information, debugging option is therefore disabled.
 option_using_file=11026_T_÷åøà àôùøåéåú îä÷åáõ $1
 % Options are also read from this file
 option_using_env=11027_T_÷åøà àôùøåéåú îäñáéáä $1
@@ -2372,6 +2372,9 @@ option_found_file=11035_D_
 option_code_page_not_available=11039_E_÷åã ãó ìà éãåò
 option_config_is_dir=11040_F_ðîöàä ñôøééä áî÷åí ÷åáõ ääâãøåú $1
 % Directories can not be used as configuration files.
+option_confict_asm_debug=11041_W_ñåâ äôìè ùì äîàñó ùðáçø "$1" àéðå éëåì ìéöåø îéãò òáåø ðéôåé ùâéàåú. îáèì ðéôåé ùâéàåú
+% The assembler output selected can not generate
+% debugging information, debugging option is therefore disabled.
 %\end{description}
 # EndOfTeX
 
@@ -2499,6 +2502,7 @@ S*2Aas_
 **2Fi<x>_îåñéó àú <x> ìøùéîú äðúéáéí
 **2Fl<x>_îåñéó àú <x> ìøùéîú äðúéáéí ùì äñôøéä
 **2FL<x>_îùúîù á<x> ëî÷ùø ãéðàîé
+**2Fm<x>_èåòï èáìú äîøä ùì éåðé÷åã îä÷åáõ x>.txt> îñôøééú äîäãø
 **2Fo<x>_îåñéó àú <x> ìøùéðú äðúéáéí ùì àåáéé÷è
 **2Fr<x>_èåòï ÷åáõ äåãòåú ùâéàä <x>
 **2Fu<x>_îåñéó àú <x> ìøùéîú äðúéáéí ùì éçéãä
@@ -2601,9 +2605,9 @@ S*2Aas_
 A*2Tlinux_Linux
 A*2Twince_Windows CE
 P*2Tamiga_AmigaOS òì PowerPC
-P*2Tdarwin_Darwin å MacOS X òì PowerPC
+P*2Tdarwin_Darwin å Mac OS X òì PowerPC
 P*2Tlinux_Linux òì PowerPC
-P*2Tmacos_MacOS (÷ìàñé) òì PowerPC
+P*2Tmacos_Mac OS (÷ìàñé) òì PowerPC
 P*2Tmorphos_MorphOS
 S*2Tlinux_Linux
 **1u<x>_îñéø àú ääâãøä ùì äñîì <x>
@@ -2638,9 +2642,9 @@ S*2Tlinux_Linux
 3*2WG_îöééï ééùåí âøôé
 3*2WN_àì úéöåø ÷åã îùðä îé÷åí (çéåðé ìðéôåé ùâéàåú)
 3*2WR_öåø ÷åã îùðä îé÷åí
-P*2WC_îöééï ééùåí îñåó (MacOS áìáã)
-P*2WG_îöééï ééùåí âøôé (MacOS áìáã)
-P*2WT_îöééï ééùåí îñåâ ëìé (ëìé MPW, MacOS áìáã)
+P*2WC_îöééï ééùåí îñåó (Mac OS áìáã)
+P*2WG_îöééï ééùåí âøôé (Mac OS áìáã)
+P*2WT_îöééï ééùåí îñåâ ëìé (ëìé MPW, Mac OS áìáã)
 **1X_äâãøåú ÷áöé øéöä:
 **2Xc_äòáø --shared ìî÷ùø (Unix áìáã)
 **2Xd_àì úùúîù áðúéáé çéôåù ñôøéåú úé÷ðééí (ðãøù áæîï äéãåø öåìá )

+ 19 - 15
compiler/msg/errorheu.msg

@@ -1,10 +1,10 @@
 #
 #   This file is part of the Free Pascal Compiler
-#   Copyright (c) 1999-2006 by the Free Pascal Development team
+#   Copyright (c) 1999-2007 by the Free Pascal Development team
 #
 #   Hebrew (UTF-8) language file for Free Pascal Compiler
 #   Contributed by Ido Kanner <idokan at gmail.com> and Dotan Kamber <kamberd at yahoo.com>
-#   Based on errore.msg of SVN revision 6685
+#   Based on errore.msg of SVN revision 7423
 #
 #   See the file COPYING.FPC, included in this distribution,
 #   for details about the copyright.
@@ -348,8 +348,8 @@ scanner_e_illegal_warn_state=02079_E_שימוש לא חוקי בהנחית $WARN
 scan_e_only_packset=02080_E_ערך של אריזה לא חוקי
 % Only 0, 1, 2, 4, 8, DEFAULT and NORMAL are allowed as packset parameter
 scan_w_pic_ignored=02081_W_מתעלם מהוראת PIC
-% Several targets like windows doesn't support and need the PIC directive so
-% it is ignored.
+% Several targets like windows do not support the PIC directive and need it to be
+% ignored.
 % \end{description}
 #
 # Parser
@@ -1023,7 +1023,7 @@ parser_e_goto_outside_proc=03201_E_לא ניתן להשמש בgoto בין שני
 % ...
 %
 % \end{verbatim}
-parser_f_too_complex_proc=03202_F_השיגרה מסובכת מידי ודרשת שימוש של יותר מידי אוגרים
+parser_f_too_complex_proc=03202_F_השיגרה מסובכת מידי ודורשת שימוש של אוגרים רבים מידי
 % Your procedure body is too long for the compiler. You should split the
 % procedure into multiple smaller procedures.
 parser_e_illegal_expression=03203_E_ביטוי לא חוקי
@@ -1131,6 +1131,8 @@ parser_f_no_anonymous_specializations=03232_F_פירוט של generic אנוני
 %   MyLinkedList: TMyLinkedList
 parser_e_initialized_not_for_external=03233_E_לא ניתן לאתחל ערך ברירת מחדל למשתנים המוגדרים כexternal
 % Variables declared as external can not be initialized with a default value.
+parser_e_illegal_function_result=03234_E_טיפוס החזרה של הפונקציה אינו חוקי
+% Some types like file types can not be used as function result
 % \end{description}
 #
 # Type Checking
@@ -1251,8 +1253,9 @@ type_e_wrong_math_argument=04027_E_ביטוי קבוע לא חוקי הוזן ל
 % The constant argument passed to a ln or sqrt function is out of
 % the definition range of these functions.
 type_e_no_addr_of_constant=04028_E_לא ניתן לקבל את הכתובת של הקבוע
-% It is not possible to get the address of a constant, because they
-% aren't stored in memory, you can try making it a typed constant.
+% It is not possible to get the address of a constant expression, because they
+% aren't stored in memory. You can try making it a typed constant. This error
+% can also be displayed if you try to pass a property to a var parameter.
 type_e_argument_cant_be_assigned=04029_E_לא ניתן להשים את הארגומנט
 % Only expressions which can be on the left side of an
 % assignment can be passed as call by reference argument
@@ -2348,9 +2351,6 @@ option_asm_forced=11022_W_התוכן של המאסף "$1" לא מסוגל ליצ
 % The assembler output selected can not generate
 % object files with the correct format. Therefore, the
 % default assembler for this target is used instead.
-option_confict_asm_debug=11041_W_סוג הפלט של המאסף שנבחר "$1" אינו יכול ליצור מידע עבור ניפוי שגיאות. מבטל ניפוי שגיאות
-% The assembler output selected can not generate
-% debugging information, debugging option is therefore disabled.
 option_using_file=11026_T_קורא אפשרויות מהקובץ $1
 % Options are also read from this file
 option_using_env=11027_T_קורא אפשרויות מהסביבה $1
@@ -2372,6 +2372,9 @@ option_found_file=11035_D_נמצא קובץ מקור בשם "$1"
 option_code_page_not_available=11039_E_קוד דף לא ידוע
 option_config_is_dir=11040_F_נמצאה ספרייה במקום קובץ ההגדרות $1
 % Directories can not be used as configuration files.
+option_confict_asm_debug=11041_W_סוג הפלט של המאסף שנבחר "$1" אינו יכול ליצור מידע עבור ניפוי שגיאות. מבטל ניפוי שגיאות
+% The assembler output selected can not generate
+% debugging information, debugging option is therefore disabled.
 %\end{description}
 # EndOfTeX
 
@@ -2499,6 +2502,7 @@ S*2Aas_אסוף עם GNU AS
 **2Fi<x>_מוסיף את <x> לרשימת הנתיבים
 **2Fl<x>_מוסיף את <x> לרשימת הנתיבים של הספריה
 **2FL<x>_משתמש ב<x> כמקשר דינאמי
+**2Fm<x>_טוען טבלת המרה של יוניקוד מהקובץ x>.txt> מספריית המהדר
 **2Fo<x>_מוסיף את <x> לרשינת הנתיבים של אובייקט
 **2Fr<x>_טוען קובץ הודעות שגיאה <x>
 **2Fu<x>_מוסיף את <x> לרשימת הנתיבים של יחידה
@@ -2601,9 +2605,9 @@ S*2Aas_אסוף עם GNU AS
 A*2Tlinux_Linux
 A*2Twince_Windows CE
 P*2Tamiga_AmigaOS על PowerPC
-P*2Tdarwin_Darwin ו MacOS X על PowerPC
+P*2Tdarwin_Darwin ו Mac OS X על PowerPC
 P*2Tlinux_Linux על PowerPC
-P*2Tmacos_MacOS (קלאסי) על PowerPC
+P*2Tmacos_Mac OS (קלאסי) על PowerPC
 P*2Tmorphos_MorphOS
 S*2Tlinux_Linux
 **1u<x>_מסיר את ההגדרה של הסמל <x>
@@ -2638,9 +2642,9 @@ S*2Tlinux_Linux
 3*2WG_מציין יישום גרפי
 3*2WN_אל תיצור קוד משנה מיקום (חיוני לניפוי שגיאות)
 3*2WR_צור קוד משנה מיקום
-P*2WC_מציין יישום מסוף (MacOS בלבד)
-P*2WG_מציין יישום גרפי (MacOS בלבד)
-P*2WT_מציין יישום מסוג כלי (כלי MPW, MacOS בלבד)
+P*2WC_מציין יישום מסוף (Mac OS בלבד)
+P*2WG_מציין יישום גרפי (Mac OS בלבד)
+P*2WT_מציין יישום מסוג כלי (כלי MPW, Mac OS בלבד)
 **1X_הגדרות קבצי ריצה:
 **2Xc_העבר --shared למקשר (Unix בלבד)
 **2Xd_אל תשתמש בנתיבי חיפוש ספריות תיקניים (נדרש בזמן הידור צולב )

+ 24 - 7
compiler/ncal.pas

@@ -246,6 +246,7 @@ implementation
         currargpos,
         namedparacount,
         paracount : longint;
+        assignmenttype,
         vardatadef,
         pvardatadef : tdef;
         dispatchbyref : boolean;
@@ -319,6 +320,12 @@ implementation
               begin
                 para.value:=ctypeconvnode.create_internal(para.value,bool16type);
                 typecheckpass(para.value);
+              end
+            { force automatable float type }
+            else if is_extended(para.value.resultdef) then
+              begin
+                para.value:=ctypeconvnode.create_internal(para.value,s64floattype);
+                typecheckpass(para.value);
               end;
 
             if assigned(para.parametername) then
@@ -376,12 +383,22 @@ implementation
                   )),voidpointertype),
                   ctypeconvnode.create_internal(caddrnode.create_internal(para.value),voidpointertype)))
               else
-                addstatement(statements,cassignmentnode.create(
-                  ctypeconvnode.create_internal(cderefnode.create(caddnode.create(addn,
-                    caddrnode.create(ctemprefnode.create(params)),
-                    cordconstnode.create(paramssize,ptruinttype,false)
-                  )),voidpointertype),
-                  ctypeconvnode.create_internal(para.value,voidpointertype)));
+                begin
+                  case para.value.resultdef.size of
+                    1..4:
+                      assignmenttype:=u32inttype;
+                    8:
+                      assignmenttype:=u64inttype;
+                    else
+                      internalerror(2007042801);
+                  end;
+                  addstatement(statements,cassignmentnode.create(
+                    ctypeconvnode.create_internal(cderefnode.create(caddnode.create(addn,
+                      caddrnode.create(ctemprefnode.create(params)),
+                      cordconstnode.create(paramssize,ptruinttype,false)
+                    )),assignmenttype),
+                    ctypeconvnode.create_internal(para.value,assignmenttype)));
+                end;
 
             if is_ansistring(para.value.resultdef) then
               calldesc.argtypes[currargpos]:=varStrArg
@@ -616,7 +633,7 @@ implementation
                       temp:=Tvecnode(p).right;
                       Tvecnode(p).right:=l.getcopy;
 
-					  {Typecheckpass can only be performed *after* the l.getcopy since it
+                      {Typecheckpass can only be performed *after* the l.getcopy since it
                        can modify the tree, and l is in the hightree.}
                       typecheckpass(hightree);
 

+ 15 - 5
compiler/owbase.pas

@@ -226,8 +226,7 @@ end;
 destructor tobjectreader.destroy;
 begin
   if opened then
-   closefile;
-  freemem(buf);
+    closefile;
 end;
 
 
@@ -256,12 +255,13 @@ begin
   opened:=false;
   bufidx:=0;
   bufmax:=0;
+  freemem(buf);
 end;
 
 
 function tobjectreader.readbuf:boolean;
 begin
-  result:=true;
+  result:=bufidx<bufmax;
 end;
 
 
@@ -273,17 +273,27 @@ end;
 
 function tobjectreader.read(out b;len:longint):boolean;
 begin
+  result:=true;
+  if bufidx+len>bufmax then
+    begin
+      result:=false;
+      len:=bufmax-bufidx;
+    end;
   move(buf[bufidx],b,len);
   inc(bufidx,len);
-  result:=true;
 end;
 
 
 function tobjectreader.readarray(a:TDynamicArray;len:longint):boolean;
 begin
+  result:=true;
+  if bufidx+len>bufmax then
+    begin
+      result:=false;
+      len:=bufmax-bufidx;
+    end;
   a.write(buf[bufidx],len);
   inc(bufidx,len);
-  result:=true;
 end;
 
 function tobjectreader.getfilename : string;

+ 15 - 11
compiler/pdecsub.pas

@@ -2124,27 +2124,31 @@ const
             if assigned(pd.import_dll) then
               begin
                 { If we are not using direct dll linking under win32 then imports
-                  need to use the normal name since to functions can refer to the
+                  need to use the normal name since two functions can refer to the
                   same DLL function. This is also needed for compatability
                   with Delphi and TP7 }
+(*
                 case target_info.system of
                   system_i386_emx,
                   system_i386_os2 :
                     begin
                       { keep normal mangledname }
+                      if not (Assigned (PD.Import_Name)) then
+                       Result := PD.MangledName;
                     end;
                   else
-                    if assigned(pd.import_name) then
-                      begin
-                        if target_info.system in system_all_windows then
-                          { cprefix is not used in DLL imports under Windows }
-                          result:=pd.import_name^
-                        else
-                          result:=maybe_cprefix(pd.import_name^);
-                      end
+*)
+                if assigned(pd.import_name) then
+                  begin
+                    if target_info.system in (system_all_windows +
+                                       [system_i386_emx, system_i386_os2]) then
+                   { cprefix is not used in DLL imports under Windows or OS/2 }
+                      result:=pd.import_name^
                     else
-                      result:=ExtractFileName(pd.import_dll^)+'_index_'+tostr(pd.import_nr);
-                end;
+                      result:=maybe_cprefix(pd.import_name^);
+                  end
+                else
+                  result:=ExtractFileName(pd.import_dll^)+'_index_'+tostr(pd.import_nr);
               end
             else
               result:=maybe_cprefix(pd.import_name^);

+ 1 - 1
compiler/pinline.pas

@@ -96,7 +96,7 @@ implementation
             if is_new then
               begin
                 sym:=search_class_member(classh,'CREATE');
-                p2 := cloadvmtaddrnode.create(ctypenode.create(p.resultdef));;
+                p2 := cloadvmtaddrnode.create(ctypenode.create(p.resultdef));
               end
             else
               begin

+ 1 - 1
compiler/pmodules.pas

@@ -1484,7 +1484,7 @@ implementation
          { We might need the symbols info if not using
            the default do_extractsymbolinfo
            which is a dummy function PM }
-         needsymbolinfo:=do_extractsymbolinfo<>@def_extractsymbolinfo;;
+         needsymbolinfo:=do_extractsymbolinfo<>@def_extractsymbolinfo;
          { release all local symtables that are not needed anymore }
          if (not needsymbolinfo) then
            free_localsymtables(current_module.localsymtable);

+ 1 - 1
compiler/psub.pas

@@ -1545,7 +1545,7 @@ implementation
                     (pd.hasforward) and
                     not(
                         assigned(pd.import_dll) and
-                        (target_info.system in [system_i386_wdosx,system_i386_emx,system_i386_os2,
+                        (target_info.system in [system_i386_wdosx,
                                                 system_arm_wince,system_i386_wince])
                        ) then
                    begin

+ 29 - 9
compiler/systems/t_os2.pas

@@ -284,21 +284,29 @@ procedure AddImport(const module:string;index:longint;const name:string);
  module     = Name of DLL to import from.
  index      = Index of function in DLL. Use 0 to import by name.
  name       = Name of function in DLL. Ignored when index=0;}
+(*
 var tmp1,tmp2,tmp3:string;
+*)
+var tmp1,tmp3:string;
     sym_mcount,sym_import:longint;
     fixup_mcount,fixup_import:longint;
-    func : string;
 begin
     aout_init;
+(*
     tmp2:=func;
     if profile_flag and not (copy(func,1,4)='_16_') then
+*)
+    if profile_flag and not (copy(Name,1,4)='_16_') then
         begin
             {sym_entry:=aout_sym(func,n_text+n_ext,0,0,aout_text_size);}
             sym_mcount:=aout_sym('__mcount',n_ext,0,0,0);
             {Use, say, "_$U_DosRead" for "DosRead" to import the
              non-profiled function.}
+(*
             tmp2:='__$U_'+func;
             sym_import:=aout_sym(tmp2,n_ext,0,0,0);
+*)
+            sym_import:=aout_sym(name,n_ext,0,0,0);
             aout_text_byte($55);    {push ebp}
             aout_text_byte($89);    {mov ebp, esp}
             aout_text_byte($e5);
@@ -315,14 +323,24 @@ begin
         end;
     str(seq_no,tmp1);
     tmp1:='IMPORT#'+tmp1;
+(*
     if name='' then
+*)
+    if index<>0 then
         begin
             str(index,tmp3);
+(*
             tmp3:=func+'='+module+'.'+tmp3;
+*)
+            tmp3:=Name+'='+module+'.'+tmp3;
         end
     else
+        tmp3:=Name+'='+module+'.'+name;
+(*
         tmp3:=func+'='+module+'.'+name;
     aout_sym(tmp2,n_imp1+n_ext,0,0,0);
+*)
+    aout_sym(Name,n_imp1+n_ext,0,0,0);
     aout_sym(tmp3,n_imp2+n_ext,0,0,0);
     aout_finish;
     write_ar(tmp1,aout_size);
@@ -340,22 +358,24 @@ end;
           ImportLibrary : TImportLibrary;
           ImportSymbol  : TImportSymbol;
       begin
+        LibName:=FixFileName(Current_Module.RealModuleName^ + Target_Info.StaticCLibExt);
+        seq_no:=1;
+        current_module.linkotherstaticlibs.add(libname,link_always);
+        assign(out_file,current_module.outputpath^+libname);
+        rewrite(out_file,1);
+        blockwrite(out_file,ar_magic,sizeof(ar_magic));
+
         for i:=0 to current_module.ImportLibraryList.Count-1 do
           begin
             ImportLibrary:=TImportLibrary(current_module.ImportLibraryList[i]);
-            LibName:=FixFileName(ImportLibrary.Name + Target_Info.StaticCLibExt);
-            seq_no:=1;
-            current_module.linkotherstaticlibs.add(libname,link_always);
-            assign(out_file,current_module.outputpath^+libname);
-            rewrite(out_file,1);
-            blockwrite(out_file,ar_magic,sizeof(ar_magic));
+{            LibName:=FixFileName(ImportLibrary.Name + Target_Info.StaticCLibExt);}
             for j:=0 to ImportLibrary.ImportSymbolList.Count-1 do
               begin
                 ImportSymbol:=TImportSymbol(ImportLibrary.ImportSymbolList[j]);
-                AddImport(ImportLibrary.Name,ImportSymbol.OrdNr,ImportSymbol.Name);
+                AddImport(ChangeFileExt(ExtractFileName(ImportLibrary.Name),''),ImportSymbol.OrdNr,ImportSymbol.Name);
               end;
-            close(out_file);
          end;
+         close(out_file);
       end;
 
 

+ 1 - 1
compiler/systems/t_win.pas

@@ -842,7 +842,7 @@ implementation
                 temtexport.concat(hp)
               else
                 temtexport.insertbefore(hp,hp2);
-              hp:=texported_item(current_module._exports.first);;
+              hp:=texported_item(current_module._exports.first);
            end;
 
          { write the export adress table }

+ 11 - 1
compiler/verbose.pas

@@ -482,10 +482,20 @@ var
       begin
         dostop:=((l and V_Fatal)<>0);
         if ((l and V_Error)<>0) or
+           ((l and V_Fatal)<>0) or
            (status.errorwarning and ((l and V_Warning)<>0)) or
            (status.errornote and ((l and V_Note)<>0)) or
            (status.errorhint and ((l and V_Hint)<>0)) then
-         inc(status.errorcount);
+         inc(status.errorcount)
+        else
+         if l and V_Warning <> 0 then
+          inc(status.countWarnings)
+         else
+          if l and V_Note <> 0 then
+           inc(status.countNotes)
+          else
+           if l and V_Hint <> 0 then
+            inc(status.countHints);
       { check verbosity level }
         if not CheckVerbosity(l) then
           exit;

+ 15 - 1
compiler/x86/agx86att.pas

@@ -41,6 +41,10 @@ interface
         constructor create(smart: boolean); override;
       end;
 
+      Tx86AoutGNUAssembler=class(TAoutGNUassembler)
+        constructor create(smart: boolean); override;
+      end;
+
 
      Tx86InstrWriter=class(TCPUInstrWriter)
        private
@@ -83,6 +87,16 @@ interface
         InstrWriter := Tx86InstrWriter.create(self);
       end;
 
+{****************************************************************************
+                          Tx86AoutGNUAssembler
+ ****************************************************************************}
+
+    constructor Tx86AoutGNUAssembler.create(smart: boolean);
+      begin
+        inherited create(smart);
+        InstrWriter := Tx86InstrWriter.create(self);
+      end;
+
 {****************************************************************************
                             Tx86InstrWriter
  ****************************************************************************}
@@ -339,6 +353,6 @@ initialization
   RegisterAssembler(as_i386_as_info,Tx86ATTAssembler);
   RegisterAssembler(as_i386_gas_info,Tx86ATTAssembler);
   RegisterAssembler(as_i386_gas_darwin_info,Tx86AppleGNUAssembler);
-  RegisterAssembler(as_i386_as_aout_info,Tx86ATTAssembler);
+  RegisterAssembler(as_i386_as_aout_info,Tx86AoutGNUAssembler);
 {$endif x86_64}
 end.