Browse Source

* inc(ptr) should not give warnings

peter 21 years ago
parent
commit
a9163ca649
1 changed files with 15 additions and 0 deletions
  1. 15 0
      tests/test/cg/tcnvptr.pp

+ 15 - 0
tests/test/cg/tcnvptr.pp

@@ -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.