Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2013-05

issue with trunk and dyn array

6 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin

using rev 24475 the below fails. It works using 2.6.0

Afaik it should work? dynamic types (such as TDynIntArray ) should be initialized?

Checking in the debugger it looks like VarStatIntArray2A[5] is not initialized.

program Project1;
type
   TDynIntArray = Array of Integer;
procedure Foo;
var
   VarStatIntArray2A: Array [5..9] of TDynIntArray;
begin
   SetLength(VarStatIntArray2A[5],3);
end;
begin
   Foo;
end.

Reply by email

Martin
to Martin

forgot: win32 vista

Martin wrote 30 lines
using rev 24475 the below fails. It works using 2.6.0 Afaik it should work? dynamic types (such as TDynIntArray ) should be initialized? Checking in the debugger it looks like VarStatIntArray2A[5] is not initialized. program Project1; type TDynIntArray = Array of Integer; procedure Foo; var VarStatIntArray2A: Array [5..9] of TDynIntArray; begin SetLength(VarStatIntArray2A[5],3); end; begin Foo; end. _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Paul Ishenin
to Jonas Maebe: Yes. The RTTI for that type seems to be completely messed up in current trunk. Probably…

17.05.2013 0:24, Jonas Maebe пишет:

Show quoted text 8 lines
On 16 May 2013, at 17:43, Martin wrote: > using rev 24475 the below fails. It works using 2.6.0 > > Afaik it should work? dynamic types (such as TDynIntArray ) should be initialized? Yes. The RTTI for that type seems to be completely messed up in current trunk. Probably caused by r24458.

Dynamic arrays were not touched by this revision. I only changed RTTI for non-dynamic array types.

Best regards,
Paul Ishenin

Reply by email

Paul Ishenin
to Paul Ishenin

17.05.2013 8:59, Paul Ishenin пишет:

Show quoted text 5 lines
> Yes. The RTTI for that type seems to be completely messed up in > current trunk. Probably caused by r24458. Dynamic arrays were not touched by this revision. I only changed RTTI for non-dynamic array types.

Heh. But in the Martic example was "array[...] of dynamic array" which was wrongly treated as 2-dimension array of integer.

I've fixed that in r24522. Sorry for error.

Best regards,
Paul Ishenin

Reply by email