Hello all,

I'm using FPC 2.6.0 and have the following test program :

program test;

function Element: Double;
begin
  Result := 4;
end;

function Tmp: Double;
begin
  Result := 10; + Element;
end;

begin
  WriteLn(Tmp);
end.

And quite surprisingly to me, both ppc386 and pccrossx64 compile it successfully in Delphi mode! What's even weirder is that if I replace the Plus operator by a Minus operator, then the compilation fails.
What I was expecting is that the compilation fails in all cases.
Is there some flag that I failed to specify?

Regards
OBones
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to