[fpc-devel] A lot of stuff broke, looking for advice
Sven Barth
pascaldragon at googlemail.com
Mon Jul 8 19:33:35 CEST 2013
On 08.07.2013 16:50, Jonas Maebe wrote:
>
> On 08 Jul 2013, at 16:39, Anthony Walter wrote:
>
>> Here is an example:
>>
>> { TObjectList<TItem: TObject> = class(TIndexedList<TItem>) }
>>
>> bare.types.pas(1176,1) procedure/function constructor Create(Boolean);An
>> unhandled exception occurred at $0816975E:
>> bare.types.pas(1182,1) procedure/function procedure Clone:TObject;
>> Fatal: Compilation aborted
>> Error: ppc386 returned an error exitcode
>
> Well, the compiler crashing with an unhandled exception is obviously
> always a compiler bug, rather than an indication that backward
> compatibility has been purposefully broken. The interleaved output of
> the unhandled exception and the errors is also strange.
>
>> { TObjectList<TItem> }
>>
>> constructor TObjectList<TItem>.Create(OwnsObjects: Boolean);
>> begin // line 1176
>> inherited Create;
>> FOwnsObjects := OwnsObjects;
>> end;
>>
>> function TObjectList<TItem>.Clone: TObject;
>> begin
>> Result := TObjectList<TItem>.Create(False);
>> Assign(Result, Self);
>> end;
>
> Please file a bug report with complete code that can be fed to the
> compiler to reproduce the crash.
I agree with Jonas here. While you are indeed using a feature that's in
the development version of FPC (and it's not called "development
version" for fun), I've not broken anything generics related on purpose,
otherwise I'd have documented it in the approbiate places.
Also if you see "unhandled exception" or "internal error" in the
compiler's output this normally always points to a bug. So please report
it, so it can be fixed.
Regards,
Sven
More information about the fpc-devel
mailing list