diff --git a/compiler/aasm.pas b/compiler/aasm.pas index f9384c8c54..14ba51dfcf 100644 --- a/compiler/aasm.pas +++ b/compiler/aasm.pas @@ -22,6 +22,12 @@ } unit aasm; +{$ifdef FPC} + {$ifdef PACKENUMFIXED} + {$PACKENUM 1} + {$endif} +{$endif} + interface uses @@ -1108,7 +1114,10 @@ uses end. { $Log$ - Revision 1.4 2000-07-21 15:14:01 jonas + Revision 1.5 2000-08-05 13:25:06 peter + * packenum 1 fixes (merged) + + Revision 1.4 2000/07/21 15:14:01 jonas + added is_addr field for labels, if they are only used for getting the address (e.g. for io checks) and corresponding getaddrlabel() procedure diff --git a/compiler/cpubase.pas b/compiler/cpubase.pas index 190c2e9aec..f04e3c169f 100644 --- a/compiler/cpubase.pas +++ b/compiler/cpubase.pas @@ -32,6 +32,12 @@ interface {$L-,Y-} {$endif} +{$ifdef FPC} + {$ifdef PACKENUMFIXED} + {$PACKENUM 1} + {$endif} +{$endif} + uses globals,strings,cobjects,aasm; @@ -896,7 +902,10 @@ end; end. { $Log$ - Revision 1.3 2000-07-14 05:11:48 michael + Revision 1.4 2000-08-05 13:25:06 peter + * packenum 1 fixes (merged) + + Revision 1.3 2000/07/14 05:11:48 michael + Patch to 1.1 Revision 1.2 2000/07/13 11:32:39 michael diff --git a/compiler/globtype.pas b/compiler/globtype.pas index 3e9778da48..5f4f3b5663 100644 --- a/compiler/globtype.pas +++ b/compiler/globtype.pas @@ -22,6 +22,12 @@ unit globtype; interface +{$ifdef FPC} + {$ifdef PACKENUMFIXED} + {$PACKENUM 1} + {$endif} +{$endif} + const maxidlen = 64; @@ -201,7 +207,10 @@ begin end. { $Log$ - Revision 1.4 2000-08-02 19:49:59 peter + Revision 1.5 2000-08-05 13:25:06 peter + * packenum 1 fixes (merged) + + Revision 1.4 2000/08/02 19:49:59 peter * first things for default parameters Revision 1.3 2000/07/13 12:08:25 michael diff --git a/compiler/ptconst.pas b/compiler/ptconst.pas index 951b798813..0f2b8c8077 100644 --- a/compiler/ptconst.pas +++ b/compiler/ptconst.pas @@ -403,10 +403,16 @@ unit ptconst; do_firstpass(p); if p^.treetype=ordconstn then begin - if is_equal(p^.resulttype,def) then - curconstsegment^.concat(new(pai_const,init_32bit(p^.value))) - else - Message(cg_e_illegal_expression); + if is_equal(p^.resulttype,def) then + begin + case p^.resulttype^.size of + 1 : curconstsegment^.concat(new(pai_const,init_8bit(p^.value))); + 2 : curconstsegment^.concat(new(pai_const,init_16bit(p^.value))); + 4 : curconstsegment^.concat(new(pai_const,init_32bit(p^.value))); + end; + end + else + Message(cg_e_illegal_expression); end else Message(cg_e_illegal_expression); @@ -501,7 +507,7 @@ unit ptconst; { The terminating #0 to be stored in the .data section (JM) } ca[strlength]:=#0; { End of the PChar. The memory has to be allocated because in } - { tai_string.done, there is a freemem(len+1) (JM) } + { tai_string.done, there is a freemem(len+1) (JM) } ca[strlength+1]:=#0; consts^.concat(new(pai_string,init_length_pchar(ca,strlength+1))); end; @@ -794,7 +800,10 @@ unit ptconst; end. { $Log$ - Revision 1.2 2000-07-13 11:32:47 michael + Revision 1.3 2000-08-05 13:25:06 peter + * packenum 1 fixes (merged) + + Revision 1.2 2000/07/13 11:32:47 michael + removed logs } diff --git a/compiler/symconst.pas b/compiler/symconst.pas index 3a06c1dc3a..bc99c63cd1 100644 --- a/compiler/symconst.pas +++ b/compiler/symconst.pas @@ -22,6 +22,12 @@ unit symconst; interface +{$ifdef FPC} + {$ifdef PACKENUMFIXED} + {$PACKENUM 1} + {$endif} +{$endif} + const def_alignment = 4; @@ -215,7 +221,10 @@ implementation end. { $Log$ - Revision 1.3 2000-07-13 12:08:27 michael + Revision 1.4 2000-08-05 13:25:06 peter + * packenum 1 fixes (merged) + + Revision 1.3 2000/07/13 12:08:27 michael + patched to 1.1.0 with former 1.09patch from peter Revision 1.2 2000/07/13 11:32:49 michael