[fpc-devel] RE $MODE Delphi

Tomas Hajny XHajT03 at hajny.biz
Tue Nov 29 18:49:16 CET 2011


On Tue, November 29, 2011 17:51, Thaddy wrote:
> On 29-11-2011 16:54, Felipe Monteiro de Carvalho wrote:
>> mode delphi is used in a huge amount of code, so any break in
>> backwards compatibility here would be extremely unwelcome. It surely
>> would break a lot of code that I wrote. But yes, $mode strictdelphi
>> looks like a good idea if you want to implement it.
> Provided it is limited to the compiler itself - which is what I want -,
> I think I may be able create a patch.
> If there is more demand for it.
>
> Then there are the three options on how to implement:
> Should it generate a hint, a warning or a syntax error in case of a
> violation?
> I suggest a 'warning: % is not supported by Delphi'. That way code
> generation continues, which seems correct, because the generated binary
> will still work.

Which Delphi version would be the supposedly supported one? If this is not
explicitly defined, compilation might still fail when people using lower
Delphi versions try to compile the code. Do you really want to track the
feature set (especially for smaller parts like that certain feature exists
in Delphi but FPC extends the scope of the feature to a wider set of
cases)? I'd say that there is already enough bug reports about FPC not
eating Delphi code. Does anyone really want to start fixing FPC also for
bug reports about Delphi not eating code compilable with FPC? If someone
wants to support compilation of his code with a specific Delphi version,
can he do it without really compiling it with Delphi (and also testing the
result!) before publishing the code anyway?

Tomas





More information about the fpc-devel mailing list