[fpc-devel] Revision 2037 gives problems with lazarus
Jonas Maebe
jonas.maebe at elis.ugent.be
Sat Dec 24 02:10:21 CET 2005
On 23 Dec 2005, at 23:45, joost at cnoc.nl wrote:
> As information: since r2037 lazarus crashes at startup. The problem
> wasn't
> fixed in 2040.
Fixed. I've reverted 2037. It doesn't work because "out" has
braindead semantics for refcounted types imo: the caller side
decreases the refcount and sets the parameter to nil before passing
it to the caller. The stupid thing is that
a) in case of non-formal "out" parameters, the callee will decrease
the refcount anyway before assigning something to the "out"
parameter, so it's not necessary
b) in case of formal (i.e. typeless) "out" parameters, the callee
will obviously not do that. But that seems to be completely normal to
me and not something the compiler should do behind your back, since
you have to take care of exactly the same thing with formal "var"
parameters.
Jonas
More information about the fpc-devel
mailing list