add tests for untyped pointer arithmetic warnings

git-svn-id: trunk@4820 -
This commit is contained in:
micha 2006-10-07 16:28:21 +00:00
parent d07f470b71
commit f47f8e6af1
4 changed files with 38 additions and 0 deletions

3
.gitattributes vendored
View File

@ -5336,6 +5336,8 @@ tests/tbf/tb0178.pp svneol=native#text/plain
tests/tbf/tb0179.pp svneol=native#text/plain
tests/tbf/tb0180.pp svneol=native#text/plain
tests/tbf/tb0181.pp svneol=native#text/plain
tests/tbf/tb0182.pp svneol=native#text/plain
tests/tbf/tb0183.pp svneol=native#text/plain
tests/tbf/ub0115.pp svneol=native#text/plain
tests/tbf/ub0149.pp svneol=native#text/plain
tests/tbf/ub0158a.pp svneol=native#text/plain
@ -5836,6 +5838,7 @@ tests/tbs/tb0500.pp svneol=native#text/plain
tests/tbs/tb0501.pp svneol=native#text/plain
tests/tbs/tb0502.pp svneol=native#text/plain
tests/tbs/tb0503.pp svneol=native#text/plain
tests/tbs/tb0504.pp svneol=native#text/plain
tests/tbs/ub0060.pp svneol=native#text/plain
tests/tbs/ub0069.pp svneol=native#text/plain
tests/tbs/ub0119.pp svneol=native#text/plain

12
tests/tbf/tb0182.pp Normal file
View File

@ -0,0 +1,12 @@
{ %OPT=-Sew }
{ %fail }
{$T-}
var
i: integer;
p: pointer;
begin
p := @i+5;
i := integer(p-p);
end.

12
tests/tbf/tb0183.pp Normal file
View File

@ -0,0 +1,12 @@
{ %OPT=-Sew }
{ %fail }
{$T-}
var
i: integer;
p: pointer;
begin
p := pointer(@i)+5;
i := integer(@i-p);
end.

11
tests/tbs/tb0504.pp Normal file
View File

@ -0,0 +1,11 @@
{ %OPT=-Sew }
{$T-}
var
i: integer;
p: pointer;
begin
p := pointer(@i)+5;
i := integer(p-p);
end.