[fpc-devel] FPC 2.3.1 SVN 8427: new compilation error.
Jonas Maebe
jonas.maebe at elis.ugent.be
Tue Sep 11 16:03:21 CEST 2007
Bruce Tulloch wrote on di, 11 sep 2007:
> In attempting to check the resolution of the GDB/DWARF issue
> reported earlier, we've encountered a new (apparent) FPC bug.
>
> FPC 2.3.1 (SVN 8427) is producing this new compilation error:
>
> "Error: Can't take the address of constant expressions"
>
> when attempting to compile a line:
>
> EOF(MyFile);
>
> where MyFile is a property of a class defined thus:
>
> TMyClass = class(TAnotherClass)
> private
> FFile : TextFile;
> protected
> property MyFile : TextFile read FFile;
> public
> ::
> ::
> end;
>
> FPC 2.1.4, Delphi6 and Kylix3 don't complain.
FPC 2.1.4 doesn't complain because it's buggy: it allows you to pass
properties to var parameters. I don't understand why Delphi/Kylix
don't complain, because they also do not allow passing properties to
var parameters (at least not in my tests) and I don't see how you
could implement Eof() without a var parameter.
Jonas
> Replacing MyFile with FFile work OK (but is not what we want
> for other reasons).
>
> Is this a new bug or a new definition of how properties may
> be handled with EOF?
>
> Cheers, Bruce.
>
> Jonas Maebe wrote:
>>
>> On 09 Sep 2007, at 17:13, Bruce Tulloch wrote:
>>
>>> Most of the bugs and problems we've encountered so far are related to
>>> the use of with statements (used extensively in this codebase) and the
>>> subtle namespace resolution differences between Delphi and FPC.
>>
>> Please report bugs about this! http://www.freepascal.org/mantis . Some
>> may not be fixed because considered bugs in or too confusing behaviour
>> by Delphi, but most probably will be fixed, even if only in Delphi mode.
>>
>> I already fixed a lot of with-related bugs since 2.0.4 (mostly related
>> to "class of" reference types), but there may be more left.
>>
>>> Most of the remaining problems relate to the widget set implementation
>>> (we're using GTK1 but would like to use GTK2), especially where fonts
>>> are concerned as well as some apparent glitches in LCL's TCanvas and
>>> some other visual components when they render to the screen.
>>
>> Ditto.
>>
>>
>> Jonas
>> _______________________________________________
>> fpc-devel maillist - fpc-devel at lists.freepascal.org
>> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>>
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the fpc-devel
mailing list