* set packenum and setalloc to defined values when changing mode, resolves #40056

This commit is contained in:
florian 2024-03-08 20:12:55 +01:00
parent 1dbcba4796
commit 5086cf7e72
2 changed files with 20 additions and 3 deletions

View File

@ -628,10 +628,17 @@ implementation
current_settings.setalloc:=1;
end
else if (m_mac in current_settings.modeswitches) then
begin
{ compatible with Metrowerks Pascal }
current_settings.packenum:=2
current_settings.packenum:=2;
current_settings.setalloc:=default_settings.setalloc;
end
else
current_settings.packenum:=4;
begin
current_settings.packenum:=default_settings.packenum;
current_settings.setalloc:=default_settings.setalloc;
end;
if changeinit then
begin
init_settings.packenum:=current_settings.packenum;

10
tests/webtbs/tw40056.pp Normal file
View File

@ -0,0 +1,10 @@
{ %opt=-MDelphi }
program SetTest;
{$mode objfpc}
type
TEnum = (one, two);
TSet = set of TEnum;
begin
if SizeOf(TSet)<>4 then
halt(1);
end.