mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-10 23:20:29 +02:00
add tests for untyped pointer arithmetic warnings
git-svn-id: trunk@4820 -
This commit is contained in:
parent
d07f470b71
commit
f47f8e6af1
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -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
12
tests/tbf/tb0182.pp
Normal 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
12
tests/tbf/tb0183.pp
Normal 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
11
tests/tbs/tb0504.pp
Normal file
@ -0,0 +1,11 @@
|
||||
{ %OPT=-Sew }
|
||||
|
||||
{$T-}
|
||||
|
||||
var
|
||||
i: integer;
|
||||
p: pointer;
|
||||
begin
|
||||
p := pointer(@i)+5;
|
||||
i := integer(p-p);
|
||||
end.
|
Loading…
Reference in New Issue
Block a user