* fix sizeof(array of const)

git-svn-id: trunk@1954 -
This commit is contained in:
peter 2005-12-15 08:58:45 +00:00
parent acb7b263b0
commit 739ea825d4
3 changed files with 17 additions and 0 deletions

1
.gitattributes vendored
View File

@ -6605,6 +6605,7 @@ tests/webtbs/tw4537.pp svneol=native#text/plain
tests/webtbs/tw4540.pp -text svneol=unset#text/plain
tests/webtbs/tw4557.pp svneol=native#text/plain
tests/webtbs/tw4566.pp -text svneol=unset#text/plain
tests/webtbs/tw4599.pp svneol=native#text/plain
tests/webtbs/ub1873.pp svneol=native#text/plain
tests/webtbs/ub1883.pp svneol=native#text/plain
tests/webtbs/uw0555.pp svneol=native#text/plain

View File

@ -493,6 +493,7 @@ implementation
(is_object(p1.resulttype.def) and
(oo_has_constructor in tobjectdef(p1.resulttype.def).objectoptions)) or
is_open_array(p1.resulttype.def) or
is_array_of_const(p1.resulttype.def) or
is_open_string(p1.resulttype.def)
) then
statement_syssym:=geninlinenode(in_sizeof_x,false,p1)

15
tests/webtbs/tw4599.pp Executable file
View File

@ -0,0 +1,15 @@
{ Source provided for Free Pascal Bug Report 4599 }
{ Submitted by "Sam" on 2005-12-14 }
{ e-mail: sam_herzog@yahoo.com }
{$mode objfpc}
procedure Trace(_level:byte;_msg:String;_params:array of const);
var
i : integer;
begin
i:=SizeOf(_params);
end;
begin
end.