From cca54611495e5a7b38b7cd90a563e4f6bad0d9dc Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Mon, 7 Aug 2000 11:31:04 +0000 Subject: [PATCH] * fixed bug in type conversions between enum subranges (it didn't take the packenum directive into account) + define PACKENUMFIXED symbol in options.pas (merged from fixes branch) --- compiler/htypechk.pas | 11 +++++++++-- compiler/options.pas | 9 ++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/compiler/htypechk.pas b/compiler/htypechk.pas index 3f55e5c09a..a320e4866c 100644 --- a/compiler/htypechk.pas +++ b/compiler/htypechk.pas @@ -295,7 +295,8 @@ implementation if (hd1=hd2) then begin b:=1; - doconv:=tc_equal; + { because of packenum they can have different sizes! (JM) } + doconv:=tc_int_2_int; end; end; end; @@ -1131,7 +1132,13 @@ implementation end. { $Log$ - Revision 1.2 2000-07-13 11:32:41 michael + Revision 1.3 2000-08-07 11:31:04 jonas + * fixed bug in type conversions between enum subranges (it didn't take + the packenum directive into account) + + define PACKENUMFIXED symbol in options.pas + (merged from fixes branch) + + Revision 1.2 2000/07/13 11:32:41 michael + removed logs } diff --git a/compiler/options.pas b/compiler/options.pas index f8bbf5d9c1..592f9487b3 100644 --- a/compiler/options.pas +++ b/compiler/options.pas @@ -1224,6 +1224,7 @@ begin { for the RTL } def_symbol('CARDINALMULFIXED'); {$endif cardinalmulfix} + def_symbol('PACKENUMFIXED'); { New since 1.09 } def_symbol('HASOUT'); @@ -1480,7 +1481,13 @@ end; end. { $Log$ - Revision 1.4 2000-07-14 05:11:48 michael + Revision 1.5 2000-08-07 11:31:04 jonas + * fixed bug in type conversions between enum subranges (it didn't take + the packenum directive into account) + + define PACKENUMFIXED symbol in options.pas + (merged from fixes branch) + + Revision 1.4 2000/07/14 05:11:48 michael + Patch to 1.1 Revision 1.3 2000/07/13 12:08:26 michael