* procedure version of fpc_copy to avoid errors with {$x-} (mantis #9918)

git-svn-id: trunk@8790 -
This commit is contained in:
Jonas Maebe 2007-10-14 10:55:40 +00:00
parent 8ed15c96bb
commit dc71827e2e
5 changed files with 24 additions and 1 deletions

1
.gitattributes vendored
View File

@ -8482,6 +8482,7 @@ tests/webtbs/tw9827.pp svneol=native#text/plain
tests/webtbs/tw9894.pp svneol=native#text/plain
tests/webtbs/tw9894a.pp svneol=native#text/plain
tests/webtbs/tw9897.pp svneol=native#text/plain
tests/webtbs/tw9918.pp svneol=native#text/plain
tests/webtbs/tw9919.pp -text
tests/webtbs/ub1873.pp svneol=native#text/plain
tests/webtbs/ub1883.pp svneol=native#text/plain

View File

@ -609,7 +609,7 @@ implementation
ccallparanode.create(ctypeconvnode.create_internal(
caddrnode.create_internal(right),voidpointertype),
nil)));
result:=ccallnode.createintern('fpc_copy',hp);
result:=ccallnode.createintern('fpc_copy_proc',hp);
left:=nil;
right:=nil;
exit;

View File

@ -417,6 +417,7 @@ Procedure fpc_Addref (Data,TypeInfo : Pointer); compilerproc;
Procedure fpc_DecRef (Data,TypeInfo : Pointer); compilerproc;
procedure fpc_finalize_array(data,typeinfo : pointer;count,size : longint); compilerproc;
Function fpc_Copy (Src, Dest, TypeInfo : Pointer) : SizeInt; compilerproc;
Procedure fpc_Copy_proc (Src, Dest, TypeInfo : Pointer); compilerproc; inline;
{$endif FPC_HAS_FEATURE_RTTI}

View File

@ -326,6 +326,15 @@ begin
end;
{ For internal use by the compiler, because otherwise $x- can cause trouble. }
{ Generally disabling extended syntax checking for all compilerprocs may }
{ have unintended side-effects }
procedure fpc_Copy_proc (Src, Dest, TypeInfo : Pointer);compilerproc; inline;
begin
fpc_copy_internal(src,dest,typeinfo);
end;
procedure fpc_finalize_array(data,typeinfo : pointer;count,size : longint); [Public,Alias:'FPC_FINALIZEARRAY']; compilerproc;
var
i : longint;

12
tests/webtbs/tw9918.pp Normal file
View File

@ -0,0 +1,12 @@
{ %norun }
{$x-}
PROCEDURE Test;
TYPE T = ARRAY OF Char;
VAR V : T;
BEGIN V := V;
END;
begin
end.