[fpc-devel]Bug: using @ with procedures in FPC
pfv at cooldown.demon.nl
Fri Jun 8 09:33:00 CEST 2001
> Look at program:
> program hello2;
> type TP = procedure;
> type PP = ^TP;
> p1: TP;
> p2: PP;
> procedure A;
> writeln('Hello world');
> This program is work OK when compiled by FPC in -S2 mode (OBJFPC).
> But it is crashing if compiled by FPC in -Sd mode (Delphi).
> We have the same behavior when we compile with Kylix (DCC).
That is because the procedure variables are not cleanly implemented in Tp/Delphi,
sometimes you need the @ and even sometimes @@.
> I think there is a problem: compilers do not tell us any warning
> but generate a wrong code.
> If to replace
> then DCC compiled binary work OK. But FPC do not compile this.
That's then a bug in the delphi mode code. For FPC mode it is not allowed.
More information about the fpc-devel