hi
Some time age wrote a program using an array of pointers to fixed capacity strings. The plan is to rewrite the program to use variable capacity strings. So while playing to see what *might* work
got this:
../../../gcc-2.95.3/gcc/p/types.c:1107: failed assertion `capacity && TREE_CODE (capacity) == INTEGER_CST' buff.pas:25: Internal compiler error in `declared_string_capacity', at types.c:1107 Please submit a full bug report to the GPC mailing list gpc@gnu.de. See URL:http://home.pages.de/~GNU-Pascal/todo.html for details.
from this:
unit Buff; interface
const MAXLINES = 20000;
type lline = string ( 4000 ); {buffer for data xfer}
procedure BB_AppendLine( Aline: lline ); {adds to end}
implementation var cap : integer;
type ptrline = ^Line; Line = string ( cap );
TbbArray = array[1..MAXLINES] of ptrline;
var BigBuffer : Tbbarray; {array of pointers to data} LineCount : integer = 0; FileUpdate : boolean = false; LineItem : Line;
procedure BB_AddLine( Aline: lline ); begin cap := lline.length; BigBuffer[ LineCount ] := new( ptrline, LineItem ); BigBuffer[ LineCount ]^ := Aline; inc( LineCount ); end;
j.i.c., installed that latest patch - same results.
Incidently, this won't work, either:
type cap = integer; Aline = string( cap ); {gives err msg}
Thanks, Russ