pointer Dec compiler error in v5.08.07

Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1409
Registered: 03 / 2005
Subject:

pointer Dec compiler error in v5.08.07

 · 
Posted: 23.09.2016 - 12:15  ·  #1
I get a compiler error in the following code which previously worked. (This is a test showing the error - the full app has been stable for a couple of years now).

Code
program test;

{$NOSHADOW}
{ $WG}                     {global Warnings off}

Device = mega8, VCC=5;
{ $BOOTRST $00C00}         {Reset Jump to $00C00}

Define_Fuses
//  Override_Fuses;
  NoteBook   = A;
  COMport    = USB;
  LockBits0 = [];
  FuseBits0  = [];
  FuseBits1  = [];

Import SysTick;

From System Import ;


Define
  ProcClock      = 16000000;       {Hertz}
  SysTick        = 10;             {msec}
  StackSize      = $0032, iData;
  FrameSize      = $0032, iData;

Implementation

{$IDATA}

{--------------------------------------------------------------}
{ Type Declarations }

type


{--------------------------------------------------------------}
{ Const Declarations }

{--------------------------------------------------------------}
{ Var Declarations }
{$IDATA}
var
  Normal, Reverse : string[32];

{--------------------------------------------------------------}
{ functions }
Procedure ReverseIt;
var
  i : word;
  s, d : pointer;
begin
  d := @Reverse[ 1 ];
  s := @Normal[ 33 ]; // NOTE -- is PRE-Decrement (hence 33 not 32)
  for i := 1 to 32 do
    d^++ := s^--;
  endfor;
end;



{--------------------------------------------------------------}
{ Main Program }
{$IDATA}

begin


  EnableInts;
  
  ReverseIt;
  
  loop


  endloop;
end test.
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: pointer Dec compiler error in v5.08.07

 · 
Posted: 24.09.2016 - 16:32  ·  #2
Hello Merlin,

this problem was introduced by a stronger checking for illegal "++" and "--"
usage. Fixed now. Update at monday.

rolf
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   50   64 · Page-Gen-Time: 0.063102s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI