mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 23:31:49 +02:00
* set packenum and setalloc to defined values when changing mode, resolves #40056
This commit is contained in:
parent
1dbcba4796
commit
5086cf7e72
@ -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
10
tests/webtbs/tw40056.pp
Normal 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.
|
Loading…
Reference in New Issue
Block a user