浏览代码

types.pas

pierre 26 年之前
父节点
当前提交
35777a48a1

+ 1 - 3
compiler/README

@@ -51,7 +51,5 @@ Changes in the syntax or semantic of FPC:
              because the new temporary ansistring handling support
              because the new temporary ansistring handling support
              exceptions and exceptions need the class OOP model
              exceptions and exceptions need the class OOP model
   18/05/99   The compiler will stop directly if there are errors in the
   18/05/99   The compiler will stop directly if there are errors in the
-             commandline parameters
-  01/06/99   You now need really always a @ to get the address of a procedure,
-             or you need to use the -So switch for tp7 style procvar
+             commandline parameters           
 
 

+ 5 - 2
compiler/aasm.pas

@@ -846,7 +846,7 @@ uses
 
 
     procedure ResetAsmsymbolList;
     procedure ResetAsmsymbolList;
       begin
       begin
-        asmsymbollist^.foreach({$ifdef fpc}@{$endif}resetasmsym);
+        asmsymbollist^.foreach({$ifndef TP}@{$endif}resetasmsym);
       end;
       end;
 
 
 
 
@@ -896,7 +896,10 @@ uses
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.49  1999-06-01 14:45:41  peter
+  Revision 1.50  1999-06-02 22:25:24  pierre
+  types.pas
+
+  Revision 1.49  1999/06/01 14:45:41  peter
     * @procvar is now always needed for FPC
     * @procvar is now always needed for FPC
 
 
   Revision 1.48  1999/05/28 09:11:39  peter
   Revision 1.48  1999/05/28 09:11:39  peter

+ 6 - 3
compiler/ag386bin.pas

@@ -515,7 +515,7 @@ unit ag386bin;
                convertstabs(pai_stabs(hp)^.str);
                convertstabs(pai_stabs(hp)^.str);
              ait_stab_function_name :
              ait_stab_function_name :
                if assigned(pai_stab_function_name(hp)^.str) then
                if assigned(pai_stab_function_name(hp)^.str) then
-                 funcname:=getasmsymbol(pai_stab_function_name(hp)^.str)
+                 funcname:=getasmsymbol(strpas(pai_stab_function_name(hp)^.str))
                else
                else
                  funcname:=nil;
                  funcname:=nil;
              ait_force_line :
              ait_force_line :
@@ -666,7 +666,7 @@ unit ag386bin;
                convertstabs(pai_stabs(hp)^.str);
                convertstabs(pai_stabs(hp)^.str);
              ait_stab_function_name :
              ait_stab_function_name :
                if assigned(pai_stab_function_name(hp)^.str) then
                if assigned(pai_stab_function_name(hp)^.str) then
-                 funcname:=getasmsymbol(pai_stab_function_name(hp)^.str)
+                 funcname:=getasmsymbol(strpas(pai_stab_function_name(hp)^.str))
                else
                else
                  funcname:=nil;
                  funcname:=nil;
              ait_force_line :
              ait_force_line :
@@ -812,7 +812,10 @@ unit ag386bin;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.13  1999-06-01 10:24:09  pierre
+  Revision 1.14  1999-06-02 22:25:25  pierre
+  types.pas
+
+  Revision 1.13  1999/06/01 10:24:09  pierre
    * ts010021.pp problem solved for ag386bin !
    * ts010021.pp problem solved for ag386bin !
 
 
   Revision 1.12  1999/05/27 19:43:59  peter
   Revision 1.12  1999/05/27 19:43:59  peter

+ 5 - 2
compiler/ag386int.pas

@@ -584,7 +584,7 @@ ait_stab_function_name : ;
     procedure ti386intasmlist.WriteExternals;
     procedure ti386intasmlist.WriteExternals;
       begin
       begin
         currentasmlist:=@self;
         currentasmlist:=@self;
-        AsmSymbolList^.foreach({$ifdef fpc}@{$endif}writeexternal);
+        AsmSymbolList^.foreach({$ifndef TP}@{$endif}writeexternal);
       end;
       end;
 
 
 
 
@@ -627,7 +627,10 @@ ait_stab_function_name : ;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.45  1999-06-01 14:45:43  peter
+  Revision 1.46  1999-06-02 22:25:26  pierre
+  types.pas
+
+  Revision 1.45  1999/06/01 14:45:43  peter
     * @procvar is now always needed for FPC
     * @procvar is now always needed for FPC
 
 
   Revision 1.44  1999/05/27 19:44:00  peter
   Revision 1.44  1999/05/27 19:44:00  peter

+ 5 - 2
compiler/ag386nsm.pas

@@ -559,7 +559,7 @@ ait_stab_function_name : ;
     procedure ti386nasmasmlist.WriteExternals;
     procedure ti386nasmasmlist.WriteExternals;
       begin
       begin
         currentasmlist:=@self;
         currentasmlist:=@self;
-        AsmSymbolList^.foreach({$ifdef fpc}@{$endif}writeexternal);
+        AsmSymbolList^.foreach({$ifndef TP}@{$endif}writeexternal);
       end;
       end;
 
 
 
 
@@ -597,7 +597,10 @@ ait_stab_function_name : ;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.41  1999-06-01 14:45:44  peter
+  Revision 1.42  1999-06-02 22:25:27  pierre
+  types.pas
+
+  Revision 1.41  1999/06/01 14:45:44  peter
     * @procvar is now always needed for FPC
     * @procvar is now always needed for FPC
 
 
   Revision 1.40  1999/05/27 19:44:02  peter
   Revision 1.40  1999/05/27 19:44:02  peter

+ 15 - 2
compiler/catch.pas

@@ -36,9 +36,11 @@ uses
 
 
 {$ifdef has_signal}
 {$ifdef has_signal}
 Var
 Var
-  NewSignal,OldSigSegm,OldSigInt : SignalHandler;
+  NewSignal,OldSigSegm,
+  OldSigInt,OldSigFPE : SignalHandler;
 {$endif}
 {$endif}
 
 
+Const in_const_evaluation : boolean = false;
 
 
 Implementation
 Implementation
 
 
@@ -55,6 +57,13 @@ begin
                writeln ('Panic : Internal compiler error, exiting.');
                writeln ('Panic : Internal compiler error, exiting.');
                internalerror(9999);
                internalerror(9999);
              end;
              end;
+    SIGFPE : begin
+               If in_const_evaluation then
+                 Writeln('FPE error computing constant expression')
+               else
+                 Writeln('FPE error inside compiler');
+               Stop;
+             end;
     SIGINT : begin
     SIGINT : begin
                WriteLn('Ctrl-C Signaled!');
                WriteLn('Ctrl-C Signaled!');
                Stop;
                Stop;
@@ -76,12 +85,16 @@ begin
 {$endif TP}
 {$endif TP}
   OldSigSegm:=Signal (SIGSEGV,NewSignal);
   OldSigSegm:=Signal (SIGSEGV,NewSignal);
   OldSigInt:=Signal (SIGINT,NewSignal);
   OldSigInt:=Signal (SIGINT,NewSignal);
+  OldSigFPE:=Signal (SIGFPE,NewSignal);
 {$endif}
 {$endif}
 end.
 end.
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.4  1999-01-28 19:42:03  peter
+  Revision 1.5  1999-06-02 22:25:28  pierre
+  types.pas
+
+  Revision 1.4  1999/01/28 19:42:03  peter
     * mssing endif added
     * mssing endif added
 
 
   Revision 1.3  1999/01/27 13:20:37  pierre
   Revision 1.3  1999/01/27 13:20:37  pierre

+ 10 - 7
compiler/cgai386.pas

@@ -2575,7 +2575,7 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
               p:=symtablestack;
               p:=symtablestack;
               while assigned(p) do
               while assigned(p) do
                 begin
                 begin
-                   p^.foreach({$ifdef fpc}@{$endif}initialize_threadvar);
+                   p^.foreach({$ifndef TP}@{$endif}initialize_threadvar);
                    p:=p^.next;
                    p:=p^.next;
                 end;
                 end;
               oldlist^.insertlist(exprasmlist);
               oldlist^.insertlist(exprasmlist);
@@ -2704,12 +2704,12 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
 
 
       { generate copies of call by value parameters }
       { generate copies of call by value parameters }
       if (aktprocsym^.definition^.options and poassembler=0) then
       if (aktprocsym^.definition^.options and poassembler=0) then
-        aktprocsym^.definition^.parast^.foreach({$ifdef fpc}@{$endif}copyvalueparas);
+        aktprocsym^.definition^.parast^.foreach({$ifndef TP}@{$endif}copyvalueparas);
 
 
       { initialisizes local data }
       { initialisizes local data }
-      aktprocsym^.definition^.localst^.foreach({$ifdef fpc}@{$endif}initialize_data);
+      aktprocsym^.definition^.localst^.foreach({$ifndef TP}@{$endif}initialize_data);
       { add a reference to all call by value/const parameters }
       { add a reference to all call by value/const parameters }
-      aktprocsym^.definition^.parast^.foreach({$ifdef fpc}@{$endif}incr_data);
+      aktprocsym^.definition^.parast^.foreach({$ifndef TP}@{$endif}incr_data);
 
 
       { initilisizes temp. ansi/wide string data }
       { initilisizes temp. ansi/wide string data }
       inittempansistrings;
       inittempansistrings;
@@ -2879,11 +2879,11 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
       finalizetempansistrings;
       finalizetempansistrings;
 
 
       { finalize local data }
       { finalize local data }
-      aktprocsym^.definition^.localst^.foreach({$ifdef fpc}@{$endif}finalize_data);
+      aktprocsym^.definition^.localst^.foreach({$ifndef TP}@{$endif}finalize_data);
 
 
       { finalize paras data }
       { finalize paras data }
       if assigned(aktprocsym^.definition^.parast) then
       if assigned(aktprocsym^.definition^.parast) then
-        aktprocsym^.definition^.parast^.foreach({$ifdef fpc}@{$endif}finalize_data);
+        aktprocsym^.definition^.parast^.foreach({$ifndef TP}@{$endif}finalize_data);
 
 
       { do we need to handle exceptions because of ansi/widestrings ? }
       { do we need to handle exceptions because of ansi/widestrings ? }
       if (procinfo.flags and pi_needs_implicit_finally)<>0 then
       if (procinfo.flags and pi_needs_implicit_finally)<>0 then
@@ -3086,7 +3086,10 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.2  1999-06-02 10:11:49  florian
+  Revision 1.3  1999-06-02 22:25:29  pierre
+  types.pas
+
+  Revision 1.2  1999/06/02 10:11:49  florian
     * make cycle fixed i.e. compilation with 0.99.10
     * make cycle fixed i.e. compilation with 0.99.10
     * some fixes for qword
     * some fixes for qword
     * start of register calling conventions
     * start of register calling conventions

+ 7 - 4
compiler/hcgdata.pas

@@ -203,7 +203,7 @@ implementation
          root:=nil;
          root:=nil;
          count:=0;
          count:=0;
          { insert all message handlers into a tree, sorted by name }
          { insert all message handlers into a tree, sorted by name }
-         _class^.publicsyms^.foreach({$ifdef fpc}@{$endif}insertmsgstr);
+         _class^.publicsyms^.foreach({$ifndef TP}@{$endif}insertmsgstr);
 
 
          { write all names }
          { write all names }
          if assigned(root) then
          if assigned(root) then
@@ -245,7 +245,7 @@ implementation
          root:=nil;
          root:=nil;
          count:=0;
          count:=0;
          { insert all message handlers into a tree, sorted by name }
          { insert all message handlers into a tree, sorted by name }
-         _class^.publicsyms^.foreach({$ifdef fpc}@{$endif}insertmsgint);
+         _class^.publicsyms^.foreach({$ifndef TP}@{$endif}insertmsgint);
 
 
          { now start writing of the message string table }
          { now start writing of the message string table }
          getdatalabel(r);
          getdatalabel(r);
@@ -471,7 +471,7 @@ implementation
 
 
            { walk through all public syms }
            { walk through all public syms }
            _c:=_class;
            _c:=_class;
-           p^.publicsyms^.foreach({$ifdef fpc}@{$endif}eachsym);
+           p^.publicsyms^.foreach({$ifndef TP}@{$endif}eachsym);
         end;
         end;
 
 
       var
       var
@@ -558,7 +558,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.8  1999-06-01 14:45:49  peter
+  Revision 1.9  1999-06-02 22:25:33  pierre
+  types.pas
+
+  Revision 1.8  1999/06/01 14:45:49  peter
     * @procvar is now always needed for FPC
     * @procvar is now always needed for FPC
 
 
   Revision 1.7  1999/05/27 19:44:30  peter
   Revision 1.7  1999/05/27 19:44:30  peter

+ 1 - 0
compiler/msgidx.inc

@@ -266,6 +266,7 @@ type tmsgconst=(
   cg_e_cant_choose_overload_function,
   cg_e_cant_choose_overload_function,
   cg_e_parasize_too_big,
   cg_e_parasize_too_big,
   cg_e_illegal_type_conversion,
   cg_e_illegal_type_conversion,
+  cg_d_pointer_to_longint_conv_not_portable,
   cg_e_file_must_call_by_reference,
   cg_e_file_must_call_by_reference,
   cg_e_cant_use_far_pointer_there,
   cg_e_cant_use_far_pointer_there,
   cg_e_var_must_be_reference,
   cg_e_var_must_be_reference,

+ 110 - 109
compiler/msgtxt.inc

@@ -1,7 +1,7 @@
 {$ifdef Delphi}
 {$ifdef Delphi}
-const msgtxt : array[0..000095] of string[240]=(
+const msgtxt : array[0..000096] of string[240]=(
 {$else Delphi}
 {$else Delphi}
-const msgtxt : array[0..000095,1..240] of char=(
+const msgtxt : array[0..000096,1..240] of char=(
 {$endif Delphi}
 {$endif Delphi}
   'T_Compiler: $1'#000+
   'T_Compiler: $1'#000+
   'D_Compiler OS: $1'#000+
   'D_Compiler OS: $1'#000+
@@ -282,357 +282,358 @@ const msgtxt : array[0..000095,1..240] of char=(
   'E_Can'#039't determine which overloaded function to call'#000+
   'E_Can'#039't determine which overloaded function to call'#000+
   'E_Parameter list size exceeds 65535 bytes'#000+
   'E_Parameter list size exceeds 65535 bytes'#000+
   'E_Illegal type conversion'#000+
   'E_Illegal type conversion'#000+
-  'E_File types ','must be var parameters'#000+
+  'D_Conversion ','between ordinals and pointers is not portable across pl'+
+  'atforms'#000+
+  'E_File types must be var parameters'#000+
   'E_The use of a far pointer isn'#039't allowed there'#000+
   'E_The use of a far pointer isn'#039't allowed there'#000+
   'E_illegal call by reference parameters'#000+
   'E_illegal call by reference parameters'#000+
   'E_EXPORT declared functions can'#039't be called'#000+
   'E_EXPORT declared functions can'#039't be called'#000+
-  'W_Possible illegal call of constructor or destructor (doesn'#039't matc'+
-  'h to this context)'#000+
-  'N_','Inefficient code'#000+
+  'W_Possible ','illegal call of constructor or destructor (doesn'#039't ma'+
+  'tch to this context)'#000+
+  'N_Inefficient code'#000+
   'W_unreachable code'#000+
   'W_unreachable code'#000+
   'E_procedure call with stackframe ESP/SP'#000+
   'E_procedure call with stackframe ESP/SP'#000+
   'E_Abstract methods can'#039't be called directly'#000+
   'E_Abstract methods can'#039't be called directly'#000+
-  'F_Internal Error in getfloatreg(), allocation failure'#000+
+  'F_Internal Error in getfloatreg(), allocatio','n failure'#000+
   'F_Unknown float type'#000+
   'F_Unknown float type'#000+
   'F_SecondVecn() base defined twice'#000+
   'F_SecondVecn() base defined twice'#000+
-  'F_Extended ','cg68k not supported'#000+
+  'F_Extended cg68k not supported'#000+
   'F_32-bit unsigned not supported in MC68000 mode'#000+
   'F_32-bit unsigned not supported in MC68000 mode'#000+
   'F_Internal Error in secondinline()'#000+
   'F_Internal Error in secondinline()'#000+
   'D_Register $1 weight $2 $3'#000+
   'D_Register $1 weight $2 $3'#000+
-  'E_Stack limit excedeed in local routine'#000+
+  'E_Stack limit excedeed in local ro','utine'#000+
   'D_Stack frame is omitted'#000+
   'D_Stack frame is omitted'#000+
   'E_Object or class methods can'#039't be inline.'#000+
   'E_Object or class methods can'#039't be inline.'#000+
-  'E_','Procvar calls can'#039't be inline.'#000+
+  'E_Procvar calls can'#039't be inline.'#000+
   'E_No code for inline procedure stored'#000+
   'E_No code for inline procedure stored'#000+
   'E_Element zero of an ansi/wide- or longstring can'#039't be accessed, u'+
   'E_Element zero of an ansi/wide- or longstring can'#039't be accessed, u'+
   'se (set)length instead'#000+
   'se (set)length instead'#000+
-  'E_Include and exclude not implemented in this case'#000+
-  'W_Probably illegal constant pas','sed to internal math function'#000+
+  'E_Incl','ude and exclude not implemented in this case'#000+
+  'W_Probably illegal constant passed to internal math function'#000+
   'E_Constructors or destructors can not be called inside a '#039'with'#039+
   'E_Constructors or destructors can not be called inside a '#039'with'#039+
   ' clause'#000+
   ' clause'#000+
   'E_Cannot call message handler method directly'#000+
   'E_Cannot call message handler method directly'#000+
-  'D_Starting $1 styled assembler parsing'#000+
+  'D_Starting $1 sty','led assembler parsing'#000+
   'D_Finished $1 styled assembler parsing'#000+
   'D_Finished $1 styled assembler parsing'#000+
-  'E_Non-label pat','tern contains @'#000+
+  'E_Non-label pattern contains @'#000+
   'W_Override operator not supported'#000+
   'W_Override operator not supported'#000+
   'E_Error building record offset'#000+
   'E_Error building record offset'#000+
   'E_OFFSET used without identifier'#000+
   'E_OFFSET used without identifier'#000+
   'E_Cannot use local variable or parameters here'#000+
   'E_Cannot use local variable or parameters here'#000+
-  'E_need to use OFFSET here'#000+
+  'E_n','eed to use OFFSET here'#000+
   'E_Cannot use multiple relocatable symbols'#000+
   'E_Cannot use multiple relocatable symbols'#000+
-  'E_Relocatab','le symbol can only be added'#000+
+  'E_Relocatable symbol can only be added'#000+
   'E_Invalid constant expression'#000+
   'E_Invalid constant expression'#000+
   'E_Relocatable symbol is not allowed'#000+
   'E_Relocatable symbol is not allowed'#000+
   'E_Invalid reference syntax'#000+
   'E_Invalid reference syntax'#000+
   'E_Local symbols not allowed as references'#000+
   'E_Local symbols not allowed as references'#000+
-  'E_Invalid base and index register usage'#000+
+  'E','_Invalid base and index register usage'#000+
   'E_Wrong scale factor specified'#000+
   'E_Wrong scale factor specified'#000+
-  'E_Mult','iple index register usage'#000+
+  'E_Multiple index register usage'#000+
   'E_Invalid operand type'#000+
   'E_Invalid operand type'#000+
   'E_Invalid string as opcode operand: $1'#000+
   'E_Invalid string as opcode operand: $1'#000+
   'W_@CODE and @DATA not supported'#000+
   'W_@CODE and @DATA not supported'#000+
   'E_Null label references are not allowed'#000+
   'E_Null label references are not allowed'#000+
-  'F_Divide by zero in asm evaluator'#000+
+  'F_Di','vide by zero in asm evaluator'#000+
   'F_Evaluator stack overflow'#000+
   'F_Evaluator stack overflow'#000+
-  'F_Evaluator stack u','nderflow'#000+
+  'F_Evaluator stack underflow'#000+
   'F_Invalid numeric format in asm evaluator'#000+
   'F_Invalid numeric format in asm evaluator'#000+
   'F_Invalid Operator in asm evaluator'#000+
   'F_Invalid Operator in asm evaluator'#000+
   'E_escape sequence ignored: $1'#000+
   'E_escape sequence ignored: $1'#000+
   'E_Invalid symbol reference'#000+
   'E_Invalid symbol reference'#000+
-  'W_Fwait can cause emulation problems with emu387'#000+
+  'W_Fwait can cause em','ulation problems with emu387'#000+
   'W_Calling an overload function in assembler'#000+
   'W_Calling an overload function in assembler'#000+
-  'E_U','nsupported symbol type for operand'#000+
+  'E_Unsupported symbol type for operand'#000+
   'E_Constant value out of bounds'#000+
   'E_Constant value out of bounds'#000+
   'E_Error converting decimal $1'#000+
   'E_Error converting decimal $1'#000+
   'E_Error converting octal $1'#000+
   'E_Error converting octal $1'#000+
   'E_Error converting binary $1'#000+
   'E_Error converting binary $1'#000+
-  'E_Error converting hexadecimal $1'#000+
+  'E_Error con','verting hexadecimal $1'#000+
   'H_$1 translated to $2'#000+
   'H_$1 translated to $2'#000+
-  'W_$1 is associated to an overlo','aded function'#000+
+  'W_$1 is associated to an overloaded function'#000+
   'E_Cannot use SELF outside a method'#000+
   'E_Cannot use SELF outside a method'#000+
   'E_Cannot use OLDEBP outside a nested procedure'#000+
   'E_Cannot use OLDEBP outside a nested procedure'#000+
   'W_Functions with void return value can'#039't return any value in asm c'+
   'W_Functions with void return value can'#039't return any value in asm c'+
-  'ode'#000+
+  'od','e'#000+
   'E_SEG not supported'#000+
   'E_SEG not supported'#000+
-  'E_Size suffix and destination or source size do not ma','tch'#000+
+  'E_Size suffix and destination or source size do not match'#000+
   'W_Size suffix and destination or source size do not match'#000+
   'W_Size suffix and destination or source size do not match'#000+
   'E_Assembler syntax error'#000+
   'E_Assembler syntax error'#000+
   'E_Invalid combination of opcode and operands'#000+
   'E_Invalid combination of opcode and operands'#000+
-  'E_Assemler syntax error in operand'#000+
+  'E_Assemler syntax error in opera','nd'#000+
   'E_Assemler syntax error in constant'#000+
   'E_Assemler syntax error in constant'#000+
   'E_Invalid String expression'#000+
   'E_Invalid String expression'#000+
-  '32bit con','stant created for address'#000+
+  '32bit constant created for address'#000+
   'E_Invalid or missing opcode'#000+
   'E_Invalid or missing opcode'#000+
   'E_Invalid combination of prefix and opcode: $1'#000+
   'E_Invalid combination of prefix and opcode: $1'#000+
   'E_Invalid combination of override and opcode: $1'#000+
   'E_Invalid combination of override and opcode: $1'#000+
-  'E_Too many operands on line'#000+
+  'E_Too many ope','rands on line'#000+
   'W_NEAR ignored'#000+
   'W_NEAR ignored'#000+
   'W_FAR ignored'#000+
   'W_FAR ignored'#000+
   'E_Duplicate local symbol $1'#000+
   'E_Duplicate local symbol $1'#000+
-  'E_Und','efined local symbol $1'#000+
+  'E_Undefined local symbol $1'#000+
   'E_Unknown label identifier $1'#000+
   'E_Unknown label identifier $1'#000+
   'E_Invalid floating point register name'#000+
   'E_Invalid floating point register name'#000+
   'E_NOR not supported'#000+
   'E_NOR not supported'#000+
   'W_Modulo not supported'#000+
   'W_Modulo not supported'#000+
-  'E_Invalid floating point constant $1'#000+
+  'E_Invalid floating point cons','tant $1'#000+
   'E_Invalid floating point expression'#000+
   'E_Invalid floating point expression'#000+
   'E_Wrong symbol type'#000+
   'E_Wrong symbol type'#000+
-  'E_Cannot ind','ex a local var or parameter with a register'#000+
+  'E_Cannot index a local var or parameter with a register'#000+
   'E_Invalid segment override expression'#000+
   'E_Invalid segment override expression'#000+
   'W_Identifier $1 supposed external'#000+
   'W_Identifier $1 supposed external'#000+
   'E_Strings not allowed as constants'#000+
   'E_Strings not allowed as constants'#000+
-  'No type of variable specified'#000+
+  'No type of va','riable specified'#000+
   'E_assembler code not returned to text section'#000+
   'E_assembler code not returned to text section'#000+
-  'E_Not a direc','tive or local symbol $1'#000+
+  'E_Not a directive or local symbol $1'#000+
   'E_Using a defined name as a local label'#000+
   'E_Using a defined name as a local label'#000+
   'F_Too many assembler files'#000+
   'F_Too many assembler files'#000+
   'F_Selected assembler output not supported'#000+
   'F_Selected assembler output not supported'#000+
   'F_Comp not supported'#000+
   'F_Comp not supported'#000+
-  'F_Direct not support for binary writers'#000+
-  'E_Allocating of data is only allowed in bss se','ction'#000+
+  'F_Direct n','ot support for binary writers'#000+
+  'E_Allocating of data is only allowed in bss section'#000+
   'F_No binary writer selected'#000+
   'F_No binary writer selected'#000+
   'E_Asm: Opcode $1 not in table'#000+
   'E_Asm: Opcode $1 not in table'#000+
   'E_Asm: $1 invalid combination of opcode and operands'#000+
   'E_Asm: $1 invalid combination of opcode and operands'#000+
   'E_Asm: 16 Bit references not supported'#000+
   'E_Asm: 16 Bit references not supported'#000+
-  'E_Asm: Invalid effective address'#000+
+  'E_Asm: I','nvalid effective address'#000+
   'E_Asm: Immediate or reference expected'#000+
   'E_Asm: Immediate or reference expected'#000+
-  'E_Asm: $1 va','lue exceeds bounds $2'#000+
+  'E_Asm: $1 value exceeds bounds $2'#000+
   'E_Asm: Short jump is out of range $1'#000+
   'E_Asm: Short jump is out of range $1'#000+
   'W_Source operating system redefined'#000+
   'W_Source operating system redefined'#000+
   'I_Assembling (pipe) $1'#000+
   'I_Assembling (pipe) $1'#000+
   'E_Can'#039't create assember file $1'#000+
   'E_Can'#039't create assember file $1'#000+
-  'W_Assembler $1 not found, switching to external assembling'#000+
+  'W_Assembler $1',' not found, switching to external assembling'#000+
   'T_Using assembler: $1'#000+
   'T_Using assembler: $1'#000+
-  'W_Error w','hile assembling exitcode $1'#000+
+  'W_Error while assembling exitcode $1'#000+
   'W_Can'#039't call the assembler, error $1 switching to external assembl'+
   'W_Can'#039't call the assembler, error $1 switching to external assembl'+
   'ing'#000+
   'ing'#000+
   'I_Assembling $1'#000+
   'I_Assembling $1'#000+
-  'W_Linker $1 not found, switching to external linking'#000+
+  'W_Linker $1 not found, switching to external linki','ng'#000+
   'T_Using linker: $1'#000+
   'T_Using linker: $1'#000+
   'W_Object $1 not found, Linking may fail !'#000+
   'W_Object $1 not found, Linking may fail !'#000+
-  'W_Library $1',' not found, Linking may fail !'#000+
+  'W_Library $1 not found, Linking may fail !'#000+
   'W_Error while linking'#000+
   'W_Error while linking'#000+
   'W_Can'#039't call the linker, switching to external linking'#000+
   'W_Can'#039't call the linker, switching to external linking'#000+
   'I_Linking $1'#000+
   'I_Linking $1'#000+
-  'W_binder not found, switching to external binding'#000+
+  'W_binder not found, switching to external b','inding'#000+
   'W_ar not found, switching to external ar'#000+
   'W_ar not found, switching to external ar'#000+
-  'E_Dynamic Libraries not supp','orted'#000+
+  'E_Dynamic Libraries not supported'#000+
   'I_Closing script $1'#000+
   'I_Closing script $1'#000+
   'W_resource compiler not found, switching to external mode'#000+
   'W_resource compiler not found, switching to external mode'#000+
   'I_Compiling resource $1'#000+
   'I_Compiling resource $1'#000+
   'F_Can'#039't post process executable $1'#000+
   'F_Can'#039't post process executable $1'#000+
-  'F_Can'#039't open executable $1'#000+
+  'F_Can'#039't open executab','le $1'#000+
   'X_Size of Code: $1 bytes'#000+
   'X_Size of Code: $1 bytes'#000+
   'X_Size of initialized data: $1 bytes'#000+
   'X_Size of initialized data: $1 bytes'#000+
-  'X_Size o','f uninitialized data: $1 bytes'#000+
+  'X_Size of uninitialized data: $1 bytes'#000+
   'X_Stack space reserved: $1 bytes'#000+
   'X_Stack space reserved: $1 bytes'#000+
   'X_Stack space commited: $1 bytes'#000+
   'X_Stack space commited: $1 bytes'#000+
   'T_Unitsearch: $1'#000+
   'T_Unitsearch: $1'#000+
   'T_PPU Loading $1'#000+
   'T_PPU Loading $1'#000+
   'U_PPU Name: $1'#000+
   'U_PPU Name: $1'#000+
   'U_PPU Flags: $1'#000+
   'U_PPU Flags: $1'#000+
-  'U_PPU Crc: $1'#000+
+  'U_','PPU Crc: $1'#000+
   'U_PPU Time: $1'#000+
   'U_PPU Time: $1'#000+
   'U_PPU File too short'#000+
   'U_PPU File too short'#000+
-  'U_PPU Invalid Header (no PPU',' at the begin)'#000+
+  'U_PPU Invalid Header (no PPU at the begin)'#000+
   'U_PPU Invalid Version $1'#000+
   'U_PPU Invalid Version $1'#000+
   'U_PPU is compiled for an other processor'#000+
   'U_PPU is compiled for an other processor'#000+
   'U_PPU is compiled for an other target'#000+
   'U_PPU is compiled for an other target'#000+
   'U_PPU Source: $1'#000+
   'U_PPU Source: $1'#000+
   'U_Writing $1'#000+
   'U_Writing $1'#000+
-  'F_Can'#039't Write PPU-File'#000+
+  'F_Can'#039't Write P','PU-File'#000+
   'F_reading PPU-File'#000+
   'F_reading PPU-File'#000+
   'F_unexpected end of PPU-File'#000+
   'F_unexpected end of PPU-File'#000+
-  'F_Invalid PPU-File e','ntry: $1'#000+
+  'F_Invalid PPU-File entry: $1'#000+
   'F_PPU Dbx count problem'#000+
   'F_PPU Dbx count problem'#000+
   'E_Illegal unit name: $1'#000+
   'E_Illegal unit name: $1'#000+
   'F_Too much units'#000+
   'F_Too much units'#000+
   'F_Circular unit reference between $1 and $2'#000+
   'F_Circular unit reference between $1 and $2'#000+
-  'F_Can'#039't compile unit $1, no sources available'#000+
+  'F_Can'#039't compile unit $1, no sources available'#000,
   'W_Compiling the system unit requires the -Us switch'#000+
   'W_Compiling the system unit requires the -Us switch'#000+
-  'F_There were $1 errors c','ompiling module, stopping'#000+
+  'F_There were $1 errors compiling module, stopping'#000+
   'U_Load from $1 ($2) unit $3'#000+
   'U_Load from $1 ($2) unit $3'#000+
   'U_Recompiling $1, checksum changed for $2'#000+
   'U_Recompiling $1, checksum changed for $2'#000+
   'U_Recompiling $1, source found only'#000+
   'U_Recompiling $1, source found only'#000+
-  'U_Recompiling unit, static lib is older than ppufile'#000+
+  'U_Recompiling unit, static lib i','s older than ppufile'#000+
   'U_Recompiling unit, shared lib is older than ppufile'#000+
   'U_Recompiling unit, shared lib is older than ppufile'#000+
-  'U_','Recompiling unit, obj and asm are older than ppufile'#000+
+  'U_Recompiling unit, obj and asm are older than ppufile'#000+
   'U_Recompiling unit, obj is older than asm'#000+
   'U_Recompiling unit, obj is older than asm'#000+
   'U_Parsing interface of $1'#000+
   'U_Parsing interface of $1'#000+
   'U_Parsing implementation of $1'#000+
   'U_Parsing implementation of $1'#000+
-  'U_Second load for unit $1'#000+
+  'U_Second loa','d for unit $1'#000+
   'U_PPU Check file $1 time $2'#000+
   'U_PPU Check file $1 time $2'#000+
-  '$1 [options] <inputfile> [options]',#000+
+  '$1 [options] <inputfile> [options]'#000+
   'W_Only one source file supported'#000+
   'W_Only one source file supported'#000+
   'W_DEF file can be created only for OS/2'#000+
   'W_DEF file can be created only for OS/2'#000+
   'E_nested response files are not supported'#000+
   'E_nested response files are not supported'#000+
   'F_No source file name in command line'#000+
   'F_No source file name in command line'#000+
-  'E_Illegal parameter: $1'#000+
+  'E_Illegal ','parameter: $1'#000+
   'H_-? writes help pages'#000+
   'H_-? writes help pages'#000+
   'F_Too many config files nested'#000+
   'F_Too many config files nested'#000+
-  'F_Unable',' to open file $1'#000+
+  'F_Unable to open file $1'#000+
   'N_Reading further options from $1'#000+
   'N_Reading further options from $1'#000+
   'W_Target is already set to: $1'#000+
   'W_Target is already set to: $1'#000+
   'W_Shared libs not supported on DOS platform, reverting to static'#000+
   'W_Shared libs not supported on DOS platform, reverting to static'#000+
-  'F_too many IF(N)DEFs'#000+
+  'F_too many IF(N)D','EFs'#000+
   'F_too many ENDIFs'#000+
   'F_too many ENDIFs'#000+
   'F_open conditional at the end of the file'#000+
   'F_open conditional at the end of the file'#000+
-  'W_Debug info','rmation generation is not supported by this executable'#000+
+  'W_Debug information generation is not supported by this executable'#000+
   'H_Try recompiling with -dGDB'#000+
   'H_Try recompiling with -dGDB'#000+
   'E_You are using the obsolete switch $1'#000+
   'E_You are using the obsolete switch $1'#000+
-  'E_You are using the obsolete switch $1, please use $2'#000+
+  'E_You are using the obsolete switch $1, p','lease use $2'#000+
   'N_Switching assembler to default source writing assembler'#000+
   'N_Switching assembler to default source writing assembler'#000+
-  'Free ','Pascal Compiler version $FPCVER [$FPCDATE] for $FPCTARGET'#000+
+  'Free Pascal Compiler version $FPCVER [$FPCDATE] for $FPCTARGET'#000+
   'Copyright (c) 1993-98 by Florian Klaempfl'#000+
   'Copyright (c) 1993-98 by Florian Klaempfl'#000+
   'Free Pascal Compiler version $FPCVER'#000+
   'Free Pascal Compiler version $FPCVER'#000+
   #000+
   #000+
-  'Compiler Date  : $FPCDATE'#000+
+  'Compiler Date  : $FPCDATE'#000,
   'Compiler Target: $FPCTARGET'#000+
   'Compiler Target: $FPCTARGET'#000+
   #000+
   #000+
-  'This program comes under the GNU General Public',' Licence'#000+
+  'This program comes under the GNU General Public Licence'#000+
   'For more information read COPYING.FPC'#000+
   'For more information read COPYING.FPC'#000+
   #000+
   #000+
   'Report bugs,suggestions etc to:'#000+
   'Report bugs,suggestions etc to:'#000+
   '                 [email protected]'#000+
   '                 [email protected]'#000+
-  '**0*_put + after a boolean switch option to enable it, - to disable it'+
-  #000+
-  '**1a_the compiler doesn'#039't delete the g','enerated assembler file'#000+
+  '**0*_put + after a boolean switch',' option to enable it, - to disable '+
+  'it'#000+
+  '**1a_the compiler doesn'#039't delete the generated assembler file'#000+
   '**2al_list sourcecode lines in assembler file'#000+
   '**2al_list sourcecode lines in assembler file'#000+
   '**2ar_list register allocation/release info in assembler file'#000+
   '**2ar_list register allocation/release info in assembler file'#000+
-  '**2at_list temp allocation/release info in assembler file'#000+
+  '**2at_list temp allocation/relea','se info in assembler file'#000+
   '**1b_generate browser info'#000+
   '**1b_generate browser info'#000+
-  '**2bl_generate local sy','mbol info'#000+
+  '**2bl_generate local symbol info'#000+
   '**1B_build all modules'#000+
   '**1B_build all modules'#000+
   '**1C<x>_code generation options:'#000+
   '**1C<x>_code generation options:'#000+
   '3*2CD_create dynamic library'#000+
   '3*2CD_create dynamic library'#000+
   '**2Ch<n>_<n> bytes heap (between 1023 and 67107840)'#000+
   '**2Ch<n>_<n> bytes heap (between 1023 and 67107840)'#000+
-  '**2Ci_IO-checking'#000+
+  '**2Ci_IO-checking',#000+
   '**2Cn_omit linking stage'#000+
   '**2Cn_omit linking stage'#000+
   '**2Co_check overflow of integer operations'#000+
   '**2Co_check overflow of integer operations'#000+
-  '**2Cr_r','ange checking'#000+
+  '**2Cr_range checking'#000+
   '**2Cs<n>_set stack size to <n>'#000+
   '**2Cs<n>_set stack size to <n>'#000+
   '**2Ct_stack checking'#000+
   '**2Ct_stack checking'#000+
   '3*2CS_create static library'#000+
   '3*2CS_create static library'#000+
   '3*2Cx_use smartlinking'#000+
   '3*2Cx_use smartlinking'#000+
   '**1d<x>_defines the symbol <x>'#000+
   '**1d<x>_defines the symbol <x>'#000+
-  '*O1D_generate a DEF file'#000+
+  '*O1D_generate a ','DEF file'#000+
   '*O2Dd<x>_set description to <x>'#000+
   '*O2Dd<x>_set description to <x>'#000+
   '*O2Dw_PM application'#000+
   '*O2Dw_PM application'#000+
-  '**1e<x>_set pa','th to executable'#000+
+  '**1e<x>_set path to executable'#000+
   '**1E_same as -Cn'#000+
   '**1E_same as -Cn'#000+
   '**1F<x>_set file names and paths:'#000+
   '**1F<x>_set file names and paths:'#000+
   '**2FD<x>_sets the directory where to search for compiler utilities'#000+
   '**2FD<x>_sets the directory where to search for compiler utilities'#000+
-  '**2Fe<x>_redirect error output to <x>'#000+
+  '**2Fe<x>_redirect error outpu','t to <x>'#000+
   '**2FE<x>_set exe/unit output path to <x>'#000+
   '**2FE<x>_set exe/unit output path to <x>'#000+
-  '**2Fi<x>_adds <x> to inclu','de path'#000+
+  '**2Fi<x>_adds <x> to include path'#000+
   '**2Fl<x>_adds <x> to library path'#000+
   '**2Fl<x>_adds <x> to library path'#000+
   '*L2FL<x>_uses <x> as dynamic linker'#000+
   '*L2FL<x>_uses <x> as dynamic linker'#000+
   '**2Fo<x>_adds <x> to object path'#000+
   '**2Fo<x>_adds <x> to object path'#000+
   '**2Fr<x>_load error message file <x>'#000+
   '**2Fr<x>_load error message file <x>'#000+
-  '**2Fu<x>_adds <x> to unit path'#000+
+  '**2Fu<x>_adds <x','> to unit path'#000+
   '**2FU<x>_set unit output path to <x>, overrides -FE'#000+
   '**2FU<x>_set unit output path to <x>, overrides -FE'#000+
-  '*g1g<x>_g','enerate debugger information:'#000+
+  '*g1g<x>_generate debugger information:'#000+
   '*g2gg_use gsym'#000+
   '*g2gg_use gsym'#000+
   '*g2gd_use dbx'#000+
   '*g2gd_use dbx'#000+
   '*g2gh_use heap trace unit'#000+
   '*g2gh_use heap trace unit'#000+
   '**1i_information'#000+
   '**1i_information'#000+
   '**2iD_return compiler date'#000+
   '**2iD_return compiler date'#000+
   '**2iV_return compiler version'#000+
   '**2iV_return compiler version'#000+
-  '**2iSO_return compiler OS'#000+
+  '**2iS','O_return compiler OS'#000+
   '**2iSP_return compiler processor'#000+
   '**2iSP_return compiler processor'#000+
-  '**2iTO_return target O','S'#000+
+  '**2iTO_return target OS'#000+
   '**2iTP_return target processor'#000+
   '**2iTP_return target processor'#000+
   '**1I<x>_adds <x> to include path'#000+
   '**1I<x>_adds <x> to include path'#000+
   '**1k<x>_Pass <x> to the linker'#000+
   '**1k<x>_Pass <x> to the linker'#000+
   '**1l_write logo'#000+
   '**1l_write logo'#000+
   '**1n_don'#039't read the default config file'#000+
   '**1n_don'#039't read the default config file'#000+
-  '**1o<x>_change the name of the executable produced to <x>'#000+
-  '**1pg_generate profile code f','or gprof'#000+
+  '**1o<x>_cha','nge the name of the executable produced to <x>'#000+
+  '**1pg_generate profile code for gprof'#000+
   '*L1P_use pipes instead of creating temporary assembler files'#000+
   '*L1P_use pipes instead of creating temporary assembler files'#000+
   '**1S<x>_syntax options:'#000+
   '**1S<x>_syntax options:'#000+
   '**2S2_switch some Delphi 2 extensions on'#000+
   '**2S2_switch some Delphi 2 extensions on'#000+
-  '**2Sc_supports operators like C (*=,+=,/= and -=)'#000+
+  '**2Sc_supports operators like',' C (*=,+=,/= and -=)'#000+
   '**2Sd_tries to be Delphi compatible'#000+
   '**2Sd_tries to be Delphi compatible'#000+
-  '**2Se_compiler stop','s after the first error'#000+
+  '**2Se_compiler stops after the first error'#000+
   '**2Sg_allow LABEL and GOTO'#000+
   '**2Sg_allow LABEL and GOTO'#000+
   '**2Sh_Use ansistrings'#000+
   '**2Sh_Use ansistrings'#000+
   '**2Si_support C++ styled INLINE'#000+
   '**2Si_support C++ styled INLINE'#000+
   '**2Sm_support macros like C (global)'#000+
   '**2Sm_support macros like C (global)'#000+
-  '**2So_tries to be TP/BP 7.0 compatible'#000+
+  '**2So_tries to be TP/B','P 7.0 compatible'#000+
   '**2Sp_tries to be gpc compatible'#000+
   '**2Sp_tries to be gpc compatible'#000+
-  '**2Ss_constructor name mus','t be init (destructor must be done)'#000+
+  '**2Ss_constructor name must be init (destructor must be done)'#000+
   '**2St_allow static keyword in objects'#000+
   '**2St_allow static keyword in objects'#000+
   '**1s_don'#039't call assembler and linker (only with -a)'#000+
   '**1s_don'#039't call assembler and linker (only with -a)'#000+
   '**1u<x>_undefines the symbol <x>'#000+
   '**1u<x>_undefines the symbol <x>'#000+
-  '**1U_unit options:'#000+
+  '**1U_','unit options:'#000+
   '**2Un_don'#039't check the unit name'#000+
   '**2Un_don'#039't check the unit name'#000+
   '**2Us_compile a system unit'#000+
   '**2Us_compile a system unit'#000+
-  '**','1v<x>_Be verbose. <x> is a combination of the following letters:'#000+
+  '**1v<x>_Be verbose. <x> is a combination of the following letters:'#000+
   '**2*_e : Show errors (default)       d : Show debug info'#000+
   '**2*_e : Show errors (default)       d : Show debug info'#000+
-  '**2*_w : Show warnings               u : Show unit info'#000+
-  '**2*_n : Show notes                  t : Show tried/used files',#000+
+  '**2*_w : Show warnings               u : S','how unit info'#000+
+  '**2*_n : Show notes                  t : Show tried/used files'#000+
   '**2*_h : Show hints                  m : Show defined macros'#000+
   '**2*_h : Show hints                  m : Show defined macros'#000+
   '**2*_i : Show general info           p : Show compiled procedures'#000+
   '**2*_i : Show general info           p : Show compiled procedures'#000+
-  '**2*_l : Show linenumbers            c : Show conditionals'#000+
-  '**2*_a : Show everything             0 : Show nothing',' (except errors'+
-  ')'#000+
+  '**2*_l : Show linenumbers           ',' c : Show conditionals'#000+
+  '**2*_a : Show everything             0 : Show nothing (except errors)'#000+
   '**2*_b : Show all procedure          r : Rhide/GCC compatibility mode'#000+
   '**2*_b : Show all procedure          r : Rhide/GCC compatibility mode'#000+
   '**2*_    declarations if an error    x : Executable info (Win32 only)'#000+
   '**2*_    declarations if an error    x : Executable info (Win32 only)'#000+
-  '**2*_    occurs'#000+
+  '**2*_  ','  occurs'#000+
   '**1X_executable options:'#000+
   '**1X_executable options:'#000+
   '*L2Xc_link with the c library'#000+
   '*L2Xc_link with the c library'#000+
-  '**2XD_link w','ith dynamic libraries (defines FPC_LINK_DYNAMIC)'#000+
+  '**2XD_link with dynamic libraries (defines FPC_LINK_DYNAMIC)'#000+
   '**2Xs_strip all symbols from executable'#000+
   '**2Xs_strip all symbols from executable'#000+
   '**2XS_link with static libraries (defines FPC_LINK_STATIC)'#000+
   '**2XS_link with static libraries (defines FPC_LINK_STATIC)'#000+
-  '**0*_Processor specific options:'#000+
+  '**0*_Processor s','pecific options:'#000+
   '3*1A<x>_output format:'#000+
   '3*1A<x>_output format:'#000+
   '3*2Ao_coff file using GNU AS'#000+
   '3*2Ao_coff file using GNU AS'#000+
-  '3*2Anas','mcoff_coff file using Nasm'#000+
+  '3*2Anasmcoff_coff file using Nasm'#000+
   '3*2Anasmelf_elf32 (Linux) file using Nasm'#000+
   '3*2Anasmelf_elf32 (Linux) file using Nasm'#000+
   '3*2Anasmobj_obj file using Nasm'#000+
   '3*2Anasmobj_obj file using Nasm'#000+
   '3*2Amasm_obj file using Masm (Microsoft)'#000+
   '3*2Amasm_obj file using Masm (Microsoft)'#000+
-  '3*2Atasm_obj file using Tasm (Borland)'#000+
+  '3*2Atasm_obj file usin','g Tasm (Borland)'#000+
   '3*1R<x>_assembler reading style:'#000+
   '3*1R<x>_assembler reading style:'#000+
-  '3*2Ratt_read AT&T style as','sembler'#000+
+  '3*2Ratt_read AT&T style assembler'#000+
   '3*2Rintel_read Intel style assembler'#000+
   '3*2Rintel_read Intel style assembler'#000+
   '3*2Rdirect_copy assembler text directly to assembler file'#000+
   '3*2Rdirect_copy assembler text directly to assembler file'#000+
   '3*1O<x>_optimizations:'#000+
   '3*1O<x>_optimizations:'#000+
   '3*2Og_generate smaller code'#000+
   '3*2Og_generate smaller code'#000+
-  '3*2OG_generate faster code (default)'#000+
-  '3*2Or_keep certain variables in registers (still ','BUGGY!!!)'#000+
+  '3*2OG_gene','rate faster code (default)'#000+
+  '3*2Or_keep certain variables in registers (still BUGGY!!!)'#000+
   '3*2Ou_enable uncertain optimizations (see docs)'#000+
   '3*2Ou_enable uncertain optimizations (see docs)'#000+
   '3*2O1_level 1 optimizations (quick optimizations)'#000+
   '3*2O1_level 1 optimizations (quick optimizations)'#000+
-  '3*2O2_level 2 optimizations (-O1 + slower optimizations)'#000+
+  '3*2O2_level 2 optimizations (-O1 + slower optimizations)',#000+
   '3*2O3_level 3 optimizations (same as -O2u)'#000+
   '3*2O3_level 3 optimizations (same as -O2u)'#000+
   '3*2Op<x>_target processor:'#000+
   '3*2Op<x>_target processor:'#000+
-  '3*3Op','1_set target processor to 386/486'#000+
+  '3*3Op1_set target processor to 386/486'#000+
   '3*3Op2_set target processor to Pentium/PentiumMMX (tm)'#000+
   '3*3Op2_set target processor to Pentium/PentiumMMX (tm)'#000+
   '3*3Op3_set target processor to PPro/PII/c6x86/K6 (tm)'#000+
   '3*3Op3_set target processor to PPro/PII/c6x86/K6 (tm)'#000+
-  '3*1T<x>_Target operating system:'#000+
+  '3*1T<x>_Target operat','ing system:'#000+
   '3*2TGO32V1_version 1 of DJ Delorie DOS extender'#000+
   '3*2TGO32V1_version 1 of DJ Delorie DOS extender'#000+
-  '3*2TGO32V2_versi','on 2 of DJ Delorie DOS extender'#000+
+  '3*2TGO32V2_version 2 of DJ Delorie DOS extender'#000+
   '3*2TLINUX_Linux'#000+
   '3*2TLINUX_Linux'#000+
   '3*2TOS2_OS/2 2.x'#000+
   '3*2TOS2_OS/2 2.x'#000+
   '3*2TWin32_Windows 32 Bit'#000+
   '3*2TWin32_Windows 32 Bit'#000+
   '6*1A<x>_output format'#000+
   '6*1A<x>_output format'#000+
   '6*2Ao_Unix o-file using GNU AS'#000+
   '6*2Ao_Unix o-file using GNU AS'#000+
-  '6*2Agas_GNU Motorola assembler'#000+
+  '6*2Agas_GNU Motorola ','assembler'#000+
   '6*2Amit_MIT Syntax (old GAS)'#000+
   '6*2Amit_MIT Syntax (old GAS)'#000+
   '6*2Amot_Standard Motorola assembler'#000+
   '6*2Amot_Standard Motorola assembler'#000+
-  '6','*1O_optimizations:'#000+
+  '6*1O_optimizations:'#000+
   '6*2Oa_turn on the optimizer'#000+
   '6*2Oa_turn on the optimizer'#000+
   '6*2Og_generate smaller code'#000+
   '6*2Og_generate smaller code'#000+
   '6*2OG_generate faster code (default)'#000+
   '6*2OG_generate faster code (default)'#000+
   '6*2Ox_optimize maximum (still BUGGY!!!)'#000+
   '6*2Ox_optimize maximum (still BUGGY!!!)'#000+
-  '6*2O2_set target processor to a MC68020+'#000+
+  '6*2O2_set ta','rget processor to a MC68020+'#000+
   '6*1R<x>_assembler reading style:'#000+
   '6*1R<x>_assembler reading style:'#000+
-  '6*2RMOT_read m','otorola style assembler'#000+
+  '6*2RMOT_read motorola style assembler'#000+
   '6*1T<x>_Target operating system:'#000+
   '6*1T<x>_Target operating system:'#000+
   '6*2TAMIGA_Commodore Amiga'#000+
   '6*2TAMIGA_Commodore Amiga'#000+
   '6*2TATARI_Atari ST/STe/TT'#000+
   '6*2TATARI_Atari ST/STe/TT'#000+
   '6*2TMACOS_Macintosh m68k'#000+
   '6*2TMACOS_Macintosh m68k'#000+
   '6*2TLINUX_Linux-68k'#000+
   '6*2TLINUX_Linux-68k'#000+
   '**1*_'#000+
   '**1*_'#000+
-  '**1?_shows this help'#000+
+  '**1?','_shows this help'#000+
   '**1h_shows this help without waiting'#000
   '**1h_shows this help without waiting'#000
 );
 );

+ 6 - 3
compiler/pass_2.pas

@@ -410,10 +410,10 @@ implementation
                         for i:=1 to maxvarregs do
                         for i:=1 to maxvarregs do
                           regvars[i]:=nil;
                           regvars[i]:=nil;
                         parasym:=false;
                         parasym:=false;
-                        symtablestack^.foreach({$ifdef fpc}@{$endif}searchregvars);
+                        symtablestack^.foreach({$ifndef TP}@{$endif}searchregvars);
                         { copy parameter into a register ? }
                         { copy parameter into a register ? }
                         parasym:=true;
                         parasym:=true;
-                        symtablestack^.next^.foreach({$ifdef fpc}@{$endif}searchregvars);
+                        symtablestack^.next^.foreach({$ifndef TP}@{$endif}searchregvars);
                         { hold needed registers free }
                         { hold needed registers free }
                         for i:=maxvarregs downto maxvarregs-p^.registers32+1 do
                         for i:=maxvarregs downto maxvarregs-p^.registers32+1 do
                           regvars[i]:=nil;
                           regvars[i]:=nil;
@@ -539,7 +539,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.24  1999-06-01 14:45:50  peter
+  Revision 1.25  1999-06-02 22:25:41  pierre
+  types.pas
+
+  Revision 1.24  1999/06/01 14:45:50  peter
     * @procvar is now always needed for FPC
     * @procvar is now always needed for FPC
 
 
   Revision 1.23  1999/05/27 19:44:43  peter
   Revision 1.23  1999/05/27 19:44:43  peter

+ 6 - 3
compiler/pdecl.pas

@@ -100,7 +100,7 @@ unit pdecl;
                reaktvarsymtable:=precdef(ptypesym(p)^.definition)^.symtable
                reaktvarsymtable:=precdef(ptypesym(p)^.definition)^.symtable
              else
              else
                reaktvarsymtable:=pobjectdef(ptypesym(p)^.definition)^.publicsyms;
                reaktvarsymtable:=pobjectdef(ptypesym(p)^.definition)^.publicsyms;
-             reaktvarsymtable^.foreach({$ifdef fpc}@{$endif}testforward_type);
+             reaktvarsymtable^.foreach({$ifndef TP}@{$endif}testforward_type);
            end;
            end;
       end;
       end;
 
 
@@ -2108,7 +2108,7 @@ unit pdecl;
              parse_var_proc_directives(newtype);
              parse_var_proc_directives(newtype);
          until token<>ID;
          until token<>ID;
          typecanbeforward:=false;
          typecanbeforward:=false;
-         symtablestack^.foreach({$ifdef fpc}@{$endif}testforward_type);
+         symtablestack^.foreach({$ifndef TP}@{$endif}testforward_type);
          resolve_forwards;
          resolve_forwards;
          block_type:=bt_general;
          block_type:=bt_general;
       end;
       end;
@@ -2219,7 +2219,10 @@ unit pdecl;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.125  1999-06-01 19:27:53  peter
+  Revision 1.126  1999-06-02 22:25:42  pierre
+  types.pas
+
+  Revision 1.125  1999/06/01 19:27:53  peter
     * better checks for procvar and methodpointer
     * better checks for procvar and methodpointer
 
 
   Revision 1.124  1999/06/01 14:45:51  peter
   Revision 1.124  1999/06/01 14:45:51  peter

+ 38 - 4
compiler/pexpr.pas

@@ -1856,16 +1856,40 @@ unit pexpr;
         sub_expr:=p1;
         sub_expr:=p1;
       end;
       end;
 
 
+    procedure check_tp_procvar(var p : ptree);
+      var
+         p1 : ptree;
+      begin
+         if (m_tp_procvar in aktmodeswitches) and
+            (not afterassignment) and
+            (not in_args) and (p^.treetype=loadn) then
+            begin
+               { support if procvar then for tp7 and many other expression like this }
+               firstpass(p);
+               if p^.resulttype^.deftype=procvardef then
+                 begin
+                    p1:=gencallnode(nil,nil);
+                    p1^.right:=p;
+                    p1^.resulttype:=pprocvardef(p^.resulttype)^.retdef;
+                    firstpass(p1);
+                    p:=p1;
+                 end;
+            end;
+      end;
+      
 
 
     function comp_expr(accept_equal : boolean):Ptree;
     function comp_expr(accept_equal : boolean):Ptree;
       var
       var
          oldafterassignment : boolean;
          oldafterassignment : boolean;
-
+         p1 : ptree;
       begin
       begin
          oldafterassignment:=afterassignment;
          oldafterassignment:=afterassignment;
          afterassignment:=true;
          afterassignment:=true;
-         comp_expr:=sub_expr(opcompare,accept_equal);
+         p1:=sub_expr(opcompare,accept_equal);
          afterassignment:=oldafterassignment;
          afterassignment:=oldafterassignment;
+         if (m_tp_procvar in aktmodeswitches) then
+           check_tp_procvar(p1);
+         comp_expr:=p1;
       end;
       end;
 
 
     function expr : ptree;
     function expr : ptree;
@@ -1879,9 +1903,12 @@ unit pexpr;
       begin
       begin
          oldafterassignment:=afterassignment;
          oldafterassignment:=afterassignment;
          p1:=sub_expr(opcompare,true);
          p1:=sub_expr(opcompare,true);
+         filepos:=tokenpos;
+         if (m_tp_procvar in aktmodeswitches) and
+            (token<>ASSIGNMENT) then
+           check_tp_procvar(p1);
          if token in [ASSIGNMENT,_PLUSASN,_MINUSASN,_STARASN,_SLASHASN] then
          if token in [ASSIGNMENT,_PLUSASN,_MINUSASN,_STARASN,_SLASHASN] then
            afterassignment:=true;
            afterassignment:=true;
-         filepos:=tokenpos;
          oldp1:=p1;
          oldp1:=p1;
          case token of
          case token of
             POINTPOINT : begin
             POINTPOINT : begin
@@ -1902,6 +1929,10 @@ unit pexpr;
                             p2:=sub_expr(opcompare,true);
                             p2:=sub_expr(opcompare,true);
                             if getprocvar and (p2^.treetype=calln) then
                             if getprocvar and (p2^.treetype=calln) then
                               handle_procvar(getprocvardef,p2);
                               handle_procvar(getprocvardef,p2);
+                            { also allow p:= proc(t); !! (PM) }
+                            if getprocvar and (p2^.treetype=typeconvn) and
+                               (p2^.left^.treetype=calln) then
+                              handle_procvar(getprocvardef,p2^.left);
                             getprocvar:=false;
                             getprocvar:=false;
                             p1:=gennode(assignn,p1,p2);
                             p1:=gennode(assignn,p1,p2);
                          end;
                          end;
@@ -1985,7 +2016,10 @@ unit pexpr;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.110  1999-06-01 19:27:55  peter
+  Revision 1.111  1999-06-02 22:25:43  pierre
+  types.pas
+
+  Revision 1.110  1999/06/01 19:27:55  peter
     * better checks for procvar and methodpointer
     * better checks for procvar and methodpointer
 
 
   Revision 1.109  1999/05/27 19:44:46  peter
   Revision 1.109  1999/05/27 19:44:46  peter

+ 7 - 1
compiler/pp.pas

@@ -115,6 +115,9 @@ uses
 {$ifdef linux}
 {$ifdef linux}
   catch,
   catch,
 {$endif}
 {$endif}
+{$ifdef go32v2}
+  catch,
+{$endif}
 {$endif FPC}
 {$endif FPC}
   globals,compiler
   globals,compiler
   ;
   ;
@@ -268,7 +271,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.42  1999-05-12 22:36:11  florian
+  Revision 1.43  1999-06-02 22:25:44  pierre
+  types.pas
+
+  Revision 1.42  1999/05/12 22:36:11  florian
     * override isn't allowed in objects!
     * override isn't allowed in objects!
 
 
   Revision 1.41  1999/05/02 09:35:45  florian
   Revision 1.41  1999/05/02 09:35:45  florian

+ 5 - 2
compiler/rautils.pas

@@ -1009,7 +1009,7 @@ end;
 
 
 procedure TLocalLabelList.CheckEmitted;
 procedure TLocalLabelList.CheckEmitted;
 begin
 begin
-  ForEach({$ifdef FPC}@{$endif}LocalLabelEmitted)
+  ForEach({$ifndef TP}@{$endif}LocalLabelEmitted)
 end;
 end;
 
 
 
 
@@ -1383,7 +1383,10 @@ end;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.17  1999-05-27 19:45:01  peter
+  Revision 1.18  1999-06-02 22:25:47  pierre
+  types.pas
+
+  Revision 1.17  1999/05/27 19:45:01  peter
     * removed oldasm
     * removed oldasm
     * plabel -> pasmlabel
     * plabel -> pasmlabel
     * -a switches to source writing automaticly
     * -a switches to source writing automaticly

+ 5 - 2
compiler/scandir.inc

@@ -1070,7 +1070,7 @@ const
             if t<>_DIR_NONE then
             if t<>_DIR_NONE then
              begin
              begin
                p:=directiveproc[t];
                p:=directiveproc[t];
-             {$ifdef FPC}
+             {$ifndef TP}
                if assigned(p) then
                if assigned(p) then
              {$else}
              {$else}
                if @p<>nil then
                if @p<>nil then
@@ -1087,7 +1087,10 @@ const
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.51  1999-04-07 14:36:45  pierre
+  Revision 1.52  1999-06-02 22:25:48  pierre
+  types.pas
+
+  Revision 1.51  1999/04/07 14:36:45  pierre
    + better preproc stack checking and report
    + better preproc stack checking and report
 
 
   Revision 1.50  1999/03/31 13:55:20  peter
   Revision 1.50  1999/03/31 13:55:20  peter

+ 23 - 11
compiler/scanner.pas

@@ -812,8 +812,10 @@ implementation
     procedure tscannerfile.skipuntildirective;
     procedure tscannerfile.skipuntildirective;
       var
       var
         found : longint;
         found : longint;
+        next_char_loaded : boolean;
       begin
       begin
          found:=0;
          found:=0;
+         next_char_loaded:=false;
          repeat
          repeat
            case c of
            case c of
              #26 :
              #26 :
@@ -839,21 +841,28 @@ implementation
                 begin
                 begin
                   readchar;
                   readchar;
                   if c='*' then
                   if c='*' then
-                  skipoldtpcomment;
+                    skipoldtpcomment
+                  else
+                    next_char_loaded:=true;
                 end;
                 end;
              else
              else
                 found:=0;
                 found:=0;
            end;
            end;
-           c:=inputpointer^;
-           if c=#0 then
-            reload
+           if next_char_loaded then
+             next_char_loaded:=false
            else
            else
-            inc(longint(inputpointer));
-           case c of
-            #26 : reload;
-            #10,
-            #13 : linebreak;
-           end;
+             begin
+                c:=inputpointer^;
+                if c=#0 then
+                  reload
+                else
+                  inc(longint(inputpointer));
+                case c of
+                  #26 : reload;
+                  #10,
+                  #13 : linebreak;
+                end;
+             end;
          until (found=2);
          until (found=2);
       end;
       end;
 
 
@@ -1661,7 +1670,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.84  1999-05-31 23:28:42  pierre
+  Revision 1.85  1999-06-02 22:25:49  pierre
+  types.pas
+
+  Revision 1.84  1999/05/31 23:28:42  pierre
    * problem with main file end without newline
    * problem with main file end without newline
 
 
   Revision 1.83  1999/05/20 14:57:29  peter
   Revision 1.83  1999/05/20 14:57:29  peter

+ 23 - 20
compiler/symdef.inc

@@ -1878,7 +1878,7 @@
          { procedure of needs_rtti !                         }
          { procedure of needs_rtti !                         }
          oldb:=binittable;
          oldb:=binittable;
          binittable:=false;
          binittable:=false;
-         symtable^.foreach({$ifdef fpc}@{$endif}check_rec_inittable);
+         symtable^.foreach({$ifndef TP}@{$endif}check_rec_inittable);
          needs_inittable:=binittable;
          needs_inittable:=binittable;
          binittable:=oldb;
          binittable:=oldb;
       end;
       end;
@@ -1966,7 +1966,7 @@
         stabrecsize:=memsizeinc;
         stabrecsize:=memsizeinc;
         strpcopy(stabRecString,'s'+tostr(savesize));
         strpcopy(stabRecString,'s'+tostr(savesize));
         RecOffset := 0;
         RecOffset := 0;
-        symtable^.foreach({$ifdef fpc}@{$endif}addname);
+        symtable^.foreach({$ifndef TP}@{$endif}addname);
         { FPC doesn't want to convert a char to a pchar}
         { FPC doesn't want to convert a char to a pchar}
         { is this a bug ? }
         { is this a bug ? }
         strpcopy(strend(StabRecString),';');
         strpcopy(strend(StabRecString),';');
@@ -2037,13 +2037,13 @@
 
 
     procedure trecdef.write_child_rtti_data;
     procedure trecdef.write_child_rtti_data;
       begin
       begin
-         symtable^.foreach({$ifdef fpc}@{$endif}generate_child_rtti);
+         symtable^.foreach({$ifndef TP}@{$endif}generate_child_rtti);
       end;
       end;
 
 
 
 
     procedure trecdef.write_child_init_data;
     procedure trecdef.write_child_init_data;
       begin
       begin
-         symtable^.foreach({$ifdef fpc}@{$endif}generate_child_inittable);
+         symtable^.foreach({$ifndef TP}@{$endif}generate_child_inittable);
       end;
       end;
 
 
 
 
@@ -2053,9 +2053,9 @@
          write_rtti_name;
          write_rtti_name;
          rttilist^.concat(new(pai_const,init_32bit(size)));
          rttilist^.concat(new(pai_const,init_32bit(size)));
          count:=0;
          count:=0;
-         symtable^.foreach({$ifdef fpc}@{$endif}count_fields);
+         symtable^.foreach({$ifndef TP}@{$endif}count_fields);
          rttilist^.concat(new(pai_const,init_32bit(count)));
          rttilist^.concat(new(pai_const,init_32bit(count)));
-         symtable^.foreach({$ifdef fpc}@{$endif}write_field_rtti);
+         symtable^.foreach({$ifndef TP}@{$endif}write_field_rtti);
       end;
       end;
 
 
 
 
@@ -2065,9 +2065,9 @@
          write_rtti_name;
          write_rtti_name;
          rttilist^.concat(new(pai_const,init_32bit(size)));
          rttilist^.concat(new(pai_const,init_32bit(size)));
          count:=0;
          count:=0;
-         symtable^.foreach({$ifdef fpc}@{$endif}count_inittable_fields);
+         symtable^.foreach({$ifndef TP}@{$endif}count_inittable_fields);
          rttilist^.concat(new(pai_const,init_32bit(count)));
          rttilist^.concat(new(pai_const,init_32bit(count)));
-         symtable^.foreach({$ifdef fpc}@{$endif}write_field_inittable);
+         symtable^.foreach({$ifndef TP}@{$endif}write_field_inittable);
       end;
       end;
 
 
     function trecdef.gettypename : string;
     function trecdef.gettypename : string;
@@ -2646,7 +2646,7 @@ Const local_symtable_index : longint = $8001;
         strpcopy(strend(StabRecString),','+tostr(i)+';');
         strpcopy(strend(StabRecString),','+tostr(i)+';');
         (* confuse gdb !! PM
         (* confuse gdb !! PM
         if assigned(parast) then
         if assigned(parast) then
-          parast^.foreach({$ifdef fpc}@{$endif}addparaname)
+          parast^.foreach({$ifndef TP}@{$endif}addparaname)
           else
           else
           begin
           begin
           param := para1;
           param := para1;
@@ -3219,14 +3219,14 @@ Const local_symtable_index : longint = $8001;
           strpcopy(strend(stabrecstring),'!1,020,'+childof^.numberstring+';');
           strpcopy(strend(stabrecstring),'!1,020,'+childof^.numberstring+';');
         {virtual table to implement yet}
         {virtual table to implement yet}
         RecOffset := 0;
         RecOffset := 0;
-        publicsyms^.foreach({$ifdef fpc}@{$endif}addname);
+        publicsyms^.foreach({$ifndef TP}@{$endif}addname);
       if (options and oo_hasvmt) <> 0 then
       if (options and oo_hasvmt) <> 0 then
         if not assigned(childof) or ((childof^.options and oo_hasvmt) = 0) then
         if not assigned(childof) or ((childof^.options and oo_hasvmt) = 0) then
            begin
            begin
               strpcopy(strend(stabrecstring),'$vf'+numberstring+':'+typeglobalnumber('vtblarray')
               strpcopy(strend(stabrecstring),'$vf'+numberstring+':'+typeglobalnumber('vtblarray')
                 +','+tostr(vmt_offset*8)+';');
                 +','+tostr(vmt_offset*8)+';');
            end;
            end;
-        publicsyms^.foreach({$ifdef fpc}@{$endif}addprocname);
+        publicsyms^.foreach({$ifndef TP}@{$endif}addprocname);
         if (options and oo_hasvmt) <> 0  then
         if (options and oo_hasvmt) <> 0  then
           begin
           begin
              anc := @self;
              anc := @self;
@@ -3263,9 +3263,9 @@ Const local_symtable_index : longint = $8001;
 
 
          rttilist^.concat(new(pai_const,init_32bit(size)));
          rttilist^.concat(new(pai_const,init_32bit(size)));
          count:=0;
          count:=0;
-         publicsyms^.foreach({$ifdef fpc}@{$endif}count_inittable_fields);
+         publicsyms^.foreach({$ifndef TP}@{$endif}count_inittable_fields);
          rttilist^.concat(new(pai_const,init_32bit(count)));
          rttilist^.concat(new(pai_const,init_32bit(count)));
-         publicsyms^.foreach({$ifdef fpc}@{$endif}write_field_inittable);
+         publicsyms^.foreach({$ifndef TP}@{$endif}write_field_inittable);
       end;
       end;
 
 
 
 
@@ -3279,7 +3279,7 @@ Const local_symtable_index : longint = $8001;
          { procedure of needs_rtti !                              }
          { procedure of needs_rtti !                              }
          oldb:=binittable;
          oldb:=binittable;
          binittable:=false;
          binittable:=false;
-         publicsyms^.foreach({$ifdef fpc}@{$endif}check_rec_inittable);
+         publicsyms^.foreach({$ifndef TP}@{$endif}check_rec_inittable);
          needs_inittable:=binittable;
          needs_inittable:=binittable;
          binittable:=oldb;
          binittable:=oldb;
       end;
       end;
@@ -3372,7 +3372,7 @@ Const local_symtable_index : longint = $8001;
 
 
     procedure tobjectdef.write_child_rtti_data;
     procedure tobjectdef.write_child_rtti_data;
       begin
       begin
-         publicsyms^.foreach({$ifdef fpc}@{$endif}generate_published_child_rtti);
+         publicsyms^.foreach({$ifndef TP}@{$endif}generate_published_child_rtti);
       end;
       end;
 
 
 
 
@@ -3396,7 +3396,7 @@ Const local_symtable_index : longint = $8001;
          else
          else
            i:=0;
            i:=0;
          count:=0;
          count:=0;
-         publicsyms^.foreach({$ifdef fpc}@{$endif}count_published_properties);
+         publicsyms^.foreach({$ifndef TP}@{$endif}count_published_properties);
          next_free_name_index:=i+count;
          next_free_name_index:=i+count;
       end;
       end;
 
 
@@ -3428,7 +3428,7 @@ Const local_symtable_index : longint = $8001;
            count:=0;
            count:=0;
 
 
          { write it }
          { write it }
-         publicsyms^.foreach({$ifdef fpc}@{$endif}count_published_properties);
+         publicsyms^.foreach({$ifndef TP}@{$endif}count_published_properties);
          rttilist^.concat(new(pai_const,init_16bit(count)));
          rttilist^.concat(new(pai_const,init_16bit(count)));
 
 
          { write unit name }
          { write unit name }
@@ -3442,7 +3442,7 @@ Const local_symtable_index : longint = $8001;
 
 
          { write published properties count }
          { write published properties count }
          count:=0;
          count:=0;
-         publicsyms^.foreach({$ifdef fpc}@{$endif}count_published_properties);
+         publicsyms^.foreach({$ifndef TP}@{$endif}count_published_properties);
          rttilist^.concat(new(pai_const,init_16bit(count)));
          rttilist^.concat(new(pai_const,init_16bit(count)));
 
 
          { count is used to write nameindex   }
          { count is used to write nameindex   }
@@ -3453,7 +3453,7 @@ Const local_symtable_index : longint = $8001;
          else
          else
            count:=0;
            count:=0;
 
 
-         publicsyms^.foreach({$ifdef fpc}@{$endif}write_property_info);
+         publicsyms^.foreach({$ifndef TP}@{$endif}write_property_info);
       end;
       end;
 
 
 
 
@@ -3494,7 +3494,10 @@ Const local_symtable_index : longint = $8001;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.127  1999-06-02 10:26:50  florian
+  Revision 1.128  1999-06-02 22:25:52  pierre
+  types.pas
+
+  Revision 1.127  1999/06/02 10:26:50  florian
     * corrected order of parameter type for -vb
     * corrected order of parameter type for -vb
 
 
   Revision 1.126  1999/06/02 10:11:50  florian
   Revision 1.126  1999/06/02 10:11:50  florian

+ 14 - 11
compiler/symtable.pas

@@ -1614,7 +1614,7 @@ const localsymtablestack : psymtable = nil;
               aktrecordsymtable:=@self;
               aktrecordsymtable:=@self;
            end;
            end;
          current_ppu^.writeentry(ibbeginsymtablebrowser);
          current_ppu^.writeentry(ibbeginsymtablebrowser);
-         foreach({$ifdef fpc}@{$endif}write_refs);
+         foreach({$ifndef TP}@{$endif}write_refs);
          current_ppu^.writeentry(ibendsymtablebrowser);
          current_ppu^.writeentry(ibendsymtablebrowser);
          if symtabletype in [recordsymtable,objectsymtable,
          if symtabletype in [recordsymtable,objectsymtable,
                     parasymtable,localsymtable] then
                     parasymtable,localsymtable] then
@@ -1638,7 +1638,7 @@ const localsymtablestack : psymtable = nil;
                   Browserlog.AddLog('---Symtable with no name');
                   Browserlog.AddLog('---Symtable with no name');
              end;
              end;
            Browserlog.Ident;
            Browserlog.Ident;
-           foreach({$ifdef fpc}@{$endif}add_to_browserlog);
+           foreach({$ifndef TP}@{$endif}add_to_browserlog);
            browserlog.Unident;
            browserlog.Unident;
          end;
          end;
       end;
       end;
@@ -1652,12 +1652,12 @@ const localsymtablestack : psymtable = nil;
     { checks, if all procsyms and methods are defined }
     { checks, if all procsyms and methods are defined }
     procedure tsymtable.check_forwards;
     procedure tsymtable.check_forwards;
       begin
       begin
-         foreach({$ifdef fpc}@{$endif}check_procsym_forward);
+         foreach({$ifndef TP}@{$endif}check_procsym_forward);
       end;
       end;
 
 
     procedure tsymtable.checklabels;
     procedure tsymtable.checklabels;
       begin
       begin
-         foreach({$ifdef fpc}@{$endif}labeldefined);
+         foreach({$ifndef TP}@{$endif}labeldefined);
       end;
       end;
 
 
     procedure tsymtable.set_alignment(_alignment : byte);
     procedure tsymtable.set_alignment(_alignment : byte);
@@ -1705,18 +1705,18 @@ const localsymtablestack : psymtable = nil;
 
 
     procedure tsymtable.allunitsused;
     procedure tsymtable.allunitsused;
       begin
       begin
-         foreach({$ifdef fpc}@{$endif}unitsymbolused);
+         foreach({$ifndef TP}@{$endif}unitsymbolused);
       end;
       end;
 
 
     procedure tsymtable.allsymbolsused;
     procedure tsymtable.allsymbolsused;
       begin
       begin
-         foreach({$ifdef fpc}@{$endif}varsymbolused);
+         foreach({$ifndef TP}@{$endif}varsymbolused);
       end;
       end;
 
 
 {$ifdef CHAINPROCSYMS}
 {$ifdef CHAINPROCSYMS}
     procedure tsymtable.chainprocsyms;
     procedure tsymtable.chainprocsyms;
       begin
       begin
-         foreach({$ifdef fpc}@{$endif}chainprocsym);
+         foreach({$ifndef TP}@{$endif}chainprocsym);
       end;
       end;
 {$endif CHAINPROCSYMS}
 {$endif CHAINPROCSYMS}
 
 
@@ -1724,7 +1724,7 @@ const localsymtablestack : psymtable = nil;
       procedure tsymtable.concatstabto(asmlist : paasmoutput);
       procedure tsymtable.concatstabto(asmlist : paasmoutput);
       begin
       begin
         asmoutput:=asmlist;
         asmoutput:=asmlist;
-        foreach({$ifdef fpc}@{$endif}concatstab);
+        foreach({$ifndef TP}@{$endif}concatstab);
       end;
       end;
 {$endif}
 {$endif}
 
 
@@ -1972,7 +1972,7 @@ const localsymtablestack : psymtable = nil;
                 dbx_counter := @dbx_count;
                 dbx_counter := @dbx_count;
              end;
              end;
            asmoutput:=asmlist;
            asmoutput:=asmlist;
-           foreach({$ifdef fpc}@{$endif}concattypestab);
+           foreach({$ifndef TP}@{$endif}concattypestab);
            if cs_gdb_dbx in aktglobalswitches then
            if cs_gdb_dbx in aktglobalswitches then
              begin
              begin
                 dbx_counter := prev_dbx_count;
                 dbx_counter := prev_dbx_count;
@@ -2127,7 +2127,7 @@ const localsymtablestack : psymtable = nil;
         _defaultprop:=nil;
         _defaultprop:=nil;
         while assigned(pd) do
         while assigned(pd) do
           begin
           begin
-             pd^.publicsyms^.foreach({$ifdef fpc}@{$endif}testfordefaultproperty);
+             pd^.publicsyms^.foreach({$ifndef TP}@{$endif}testfordefaultproperty);
              if assigned(_defaultprop) then
              if assigned(_defaultprop) then
                break;
                break;
              pd:=pd^.childof;
              pd:=pd^.childof;
@@ -2301,7 +2301,10 @@ const localsymtablestack : psymtable = nil;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.18  1999-06-01 14:45:58  peter
+  Revision 1.19  1999-06-02 22:25:53  pierre
+  types.pas
+
+  Revision 1.18  1999/06/01 14:45:58  peter
     * @procvar is now always needed for FPC
     * @procvar is now always needed for FPC
 
 
   Revision 1.17  1999/05/27 19:45:08  peter
   Revision 1.17  1999/05/27 19:45:08  peter

+ 14 - 3
compiler/tccnv.pas

@@ -813,13 +813,21 @@ implementation
                      { only if the same size or formal def }
                      { only if the same size or formal def }
                      { why do we allow typecasting of voiddef ?? (PM) }
                      { why do we allow typecasting of voiddef ?? (PM) }
                      else
                      else
-                       if not(
+                       begin
+                          if not(
                              (p^.left^.resulttype^.deftype=formaldef) or
                              (p^.left^.resulttype^.deftype=formaldef) or
                              (p^.left^.resulttype^.size=p^.resulttype^.size) or
                              (p^.left^.resulttype^.size=p^.resulttype^.size) or
                              (is_equal(p^.left^.resulttype,voiddef)  and
                              (is_equal(p^.left^.resulttype,voiddef)  and
                              (p^.left^.treetype=derefn))
                              (p^.left^.treetype=derefn))
                              ) then
                              ) then
-                         CGMessage(cg_e_illegal_type_conversion);
+                             CGMessage(cg_e_illegal_type_conversion);
+                          if ((p^.left^.resulttype^.deftype=orddef) and
+                             (p^.resulttype^.deftype=pointerdef)) or
+                             ((p^.resulttype^.deftype=orddef) and
+                             (p^.left^.resulttype^.deftype=pointerdef))
+                             {$ifdef extdebug}and (p^.firstpasscount=0){$endif} then
+                               CGMessage(cg_d_pointer_to_longint_conv_not_portable);
+                       end;
                      { the conversion into a strutured type is only }
                      { the conversion into a strutured type is only }
                      { possible, if the source is no register    }
                      { possible, if the source is no register    }
                      if ((p^.resulttype^.deftype in [recorddef,stringdef,arraydef]) or
                      if ((p^.resulttype^.deftype in [recorddef,stringdef,arraydef]) or
@@ -927,7 +935,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.33  1999-05-27 19:45:15  peter
+  Revision 1.34  1999-06-02 22:25:54  pierre
+  types.pas
+
+  Revision 1.33  1999/05/27 19:45:15  peter
     * removed oldasm
     * removed oldasm
     * plabel -> pasmlabel
     * plabel -> pasmlabel
     * -a switches to source writing automaticly
     * -a switches to source writing automaticly

+ 48 - 4
compiler/types.pas

@@ -142,6 +142,11 @@ interface
     { equal                                         }
     { equal                                         }
     function equal_paras(def1,def2 : pdefcoll;value_equal_const : boolean) : boolean;
     function equal_paras(def1,def2 : pdefcoll;value_equal_const : boolean) : boolean;
 
 
+
+    { true if a type can be allowed for another one
+      in a func var }
+    function convertable_paras(def1,def2 : pdefcoll;value_equal_const : boolean) : boolean;
+
     { true if a function can be assigned to a procvar }
     { true if a function can be assigned to a procvar }
     function proc_to_procvar_equal(def1:pprocdef;def2:pprocvardef) : boolean;
     function proc_to_procvar_equal(def1:pprocdef;def2:pprocvardef) : boolean;
 
 
@@ -162,8 +167,8 @@ interface
 implementation
 implementation
 
 
     uses
     uses
-       strings,
-       globtype,globals,verbose;
+       strings,globtype,globals,htypechk,
+       tree,verbose;
 
 
 
 
     function equal_paras(def1,def2 : pdefcoll;value_equal_const : boolean) : boolean;
     function equal_paras(def1,def2 : pdefcoll;value_equal_const : boolean) : boolean;
@@ -201,6 +206,42 @@ implementation
            equal_paras:=false;
            equal_paras:=false;
       end;
       end;
 
 
+    function convertable_paras(def1,def2 : pdefcoll;value_equal_const : boolean) : boolean;
+      var doconv : tconverttype;
+      begin
+         while (assigned(def1)) and (assigned(def2)) do
+           begin
+              if value_equal_const then
+                begin
+                   if (isconvertable(def1^.data,def2^.data,doconv,callparan,false)=0) or
+                     ((def1^.paratyp<>def2^.paratyp) and
+                      ((def1^.paratyp=vs_var) or
+                       (def1^.paratyp=vs_var)
+                      )
+                     ) then
+                     begin
+                        convertable_paras:=false;
+                        exit;
+                     end;
+                end
+              else
+                begin
+                   if (isconvertable(def1^.data,def2^.data,doconv,callparan,false)=0) or
+                     (def1^.paratyp<>def2^.paratyp) then
+                     begin
+                        convertable_paras:=false;
+                        exit;
+                     end;
+                end;
+              def1:=def1^.next;
+              def2:=def2^.next;
+           end;
+         if (def1=nil) and (def2=nil) then
+           convertable_paras:=true
+         else
+           convertable_paras:=false;
+      end;
+
 
 
     { true if a function can be assigned to a procvar }
     { true if a function can be assigned to a procvar }
     function proc_to_procvar_equal(def1:pprocdef;def2:pprocvardef) : boolean;
     function proc_to_procvar_equal(def1:pprocdef;def2:pprocvardef) : boolean;
@@ -219,7 +260,7 @@ implementation
           end;
           end;
          { check the other things }
          { check the other things }
          if is_equal(def1^.retdef,def2^.retdef) and
          if is_equal(def1^.retdef,def2^.retdef) and
-            equal_paras(def1^.para1,def2^.para1,false) and
+            convertable_paras(def1^.para1,def2^.para1,false) and
             ((def1^.options and po_compatibility_options)=
             ((def1^.options and po_compatibility_options)=
              (def2^.options and po_compatibility_options)) then
              (def2^.options and po_compatibility_options)) then
            proc_to_procvar_equal:=true
            proc_to_procvar_equal:=true
@@ -887,7 +928,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.69  1999-06-02 10:11:55  florian
+  Revision 1.70  1999-06-02 22:25:55  pierre
+  types.pas
+
+  Revision 1.69  1999/06/02 10:11:55  florian
     * make cycle fixed i.e. compilation with 0.99.10
     * make cycle fixed i.e. compilation with 0.99.10
     * some fixes for qword
     * some fixes for qword
     * start of register calling conventions
     * start of register calling conventions