mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 02:49:28 +02:00
* inc(ptr) should not give warnings
This commit is contained in:
parent
e7b4c63e99
commit
a9163ca649
15
tests/test/cg/tcnvptr.pp
Normal file
15
tests/test/cg/tcnvptr.pp
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{ %opt=-Sew }
|
||||||
|
|
||||||
|
var
|
||||||
|
p : pointer;
|
||||||
|
b : byte;
|
||||||
|
w : word;
|
||||||
|
a : array[0..10] of char;
|
||||||
|
begin
|
||||||
|
b:=1;
|
||||||
|
w:=1;
|
||||||
|
p:=@a;
|
||||||
|
// This should work without warnings
|
||||||
|
inc(p,b);
|
||||||
|
inc(p,w);
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user