+ handle -CPPACKENUM and -CPPACKRECORD, resolves #27153

git-svn-id: trunk@29283 -
This commit is contained in:
florian 2014-12-13 21:08:18 +00:00
parent d540d56908
commit bb01872821
6 changed files with 458 additions and 431 deletions

1
.gitattributes vendored
View File

@ -14167,6 +14167,7 @@ tests/webtbs/tw2708.pp svneol=native#text/plain
tests/webtbs/tw2710.pp svneol=native#text/plain
tests/webtbs/tw27120.pp svneol=native#text/pascal
tests/webtbs/tw2713.pp svneol=native#text/plain
tests/webtbs/tw27153.pp svneol=native#text/pascal
tests/webtbs/tw2721.pp svneol=native#text/plain
tests/webtbs/tw2723.pp svneol=native#text/plain
tests/webtbs/tw2725.pp svneol=native#text/plain

View File

@ -3493,6 +3493,8 @@ P*2CN_Generate nil-pointer checks (AIX-only)
**2Cp<x>_Select instruction set; see fpc -i or fpc -ic for possible values
**2CP<x>=<y>_ packing settings
**3CPPACKSET=<y>_ <y> set allocation: 0, 1 or DEFAULT or NORMAL, 2, 4 and 8
**3CPPACKENUM=<y>_ <y> enum packing: 0, 1, 2 and 4 or DEFAULT or NORMAL
**3CPPACKRECORD=<y>_ <y> record packing: 0 or DEFAULT or NORMAL, 1, 2, 4, 8, 16 and 32
**2Cr_Range checking
**2CR_Verify object method call validity
**2Cs<n>_Set stack checking size to <n>

View File

@ -994,7 +994,7 @@ const
option_info=11024;
option_help_pages=11025;
MsgTxtSize = 73924;
MsgTxtSize = 74049;
MsgIdxMax : array[1..20] of longint=(
26,99,339,123,89,57,126,27,202,64,

File diff suppressed because it is too large Load Diff

View File

@ -1198,24 +1198,46 @@ begin
'P':
begin
delete(more,1,1);
if upper(copy(more,1,pos('=',more)-1))='PACKSET' then
begin
delete(more,1,pos('=',more));
if (more='0') or (more='DEFAULT') or (more='NORMAL') then
init_settings.setalloc:=0
else if more='1' then
init_settings.setalloc:=1
else if more='2' then
init_settings.setalloc:=2
else if more='4' then
init_settings.setalloc:=4
else if more='8' then
init_settings.setalloc:=8
else
IllegalPara(opt);
end
else
IllegalPara(opt);
case upper(copy(more,1,pos('=',more)-1)) of
'PACKSET':
begin
delete(more,1,pos('=',more));
case more of
'0','DEFAULT','NORMAL':
init_settings.setalloc:=0;
'1','2','4','8':
init_settings.setalloc:=StrToInt(more);
else
IllegalPara(opt);
end
end;
'PACKENUM':
begin
delete(more,1,pos('=',more));
case more of
'0','DEFAULT','NORMAL':
init_settings.packenum:=4;
'1','2','4':
init_settings.packenum:=StrToInt(more);
else
IllegalPara(opt);
end;
end;
'PACKRECORD':
begin
delete(more,1,pos('=',more));
case more of
'0','DEFAULT','NORMAL':
init_settings.packrecords:=default_settings.packrecords;
'1','2','4','8','16','32':
init_settings.packrecords:=StrToInt(more);
else
IllegalPara(opt);
end;
end
else
IllegalPara(opt);
end;
end;
'r' :
If UnsetBool(More, j, opt, false) then

3
tests/webtbs/tw27153.pp Normal file
View File

@ -0,0 +1,3 @@
{ %OPT=-CPPACKENUM=1 -CPPACKRECORD=1 -CPPACKSET=1}
begin
end.