mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-11 00:37:20 +01:00
* fixed wrong uninitialized warnings with passing array elements
as out-parameters git-svn-id: trunk@8337 -
This commit is contained in:
parent
1235b05908
commit
b1631b6918
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -6365,6 +6365,7 @@ tests/tbs/tb0538.pp svneol=native#text/plain
|
|||||||
tests/tbs/tb0539.pp svneol=native#text/plain
|
tests/tbs/tb0539.pp svneol=native#text/plain
|
||||||
tests/tbs/tb0540.pp svneol=native#text/x-pascal
|
tests/tbs/tb0540.pp svneol=native#text/x-pascal
|
||||||
tests/tbs/tb0541.pp svneol=native#text/plain
|
tests/tbs/tb0541.pp svneol=native#text/plain
|
||||||
|
tests/tbs/tb0542.pp svneol=native#text/plain
|
||||||
tests/tbs/ub0060.pp svneol=native#text/plain
|
tests/tbs/ub0060.pp svneol=native#text/plain
|
||||||
tests/tbs/ub0069.pp svneol=native#text/plain
|
tests/tbs/ub0069.pp svneol=native#text/plain
|
||||||
tests/tbs/ub0119.pp svneol=native#text/plain
|
tests/tbs/ub0119.pp svneol=native#text/plain
|
||||||
|
|||||||
@ -1006,7 +1006,12 @@ implementation
|
|||||||
begin
|
begin
|
||||||
case parasym.varspez of
|
case parasym.varspez of
|
||||||
vs_out :
|
vs_out :
|
||||||
|
begin
|
||||||
|
{ first set written separately to avoid false }
|
||||||
|
{ uninitialized warnings (tbs/tb0542) }
|
||||||
|
set_varstate(left,vs_written,[]);
|
||||||
set_varstate(left,vs_readwritten,[]);
|
set_varstate(left,vs_readwritten,[]);
|
||||||
|
end;
|
||||||
vs_var :
|
vs_var :
|
||||||
set_varstate(left,vs_readwritten,[vsf_must_be_valid,vsf_use_hints]);
|
set_varstate(left,vs_readwritten,[vsf_must_be_valid,vsf_use_hints]);
|
||||||
else
|
else
|
||||||
|
|||||||
13
tests/tbs/tb0542.pp
Normal file
13
tests/tbs/tb0542.pp
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{ %norun }
|
||||||
|
{ %opt=-Sew }
|
||||||
|
|
||||||
|
procedure t;
|
||||||
|
var
|
||||||
|
f:array[1..10] of text;
|
||||||
|
begin
|
||||||
|
assign(f[1],paramstr(0));
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
t;
|
||||||
|
end.
|
||||||
Loading…
Reference in New Issue
Block a user