Btw, when compiling this program with default Lazarus Release build mode:
program Project1;
{$mode objfpc}{$H+}
type
TMyEnum = (zero);
function MyFunc(const aEnum: TMyEnum): string;
begin
case aEnum of
zero: Result := '0';
end;
end;
begin
WriteLn(MyFunc(zero));
end.
I get a warning:
Compile Project, Mode: Release, Target: project1.exe: Success, Warnings: 1
project1.lpr(9,1) Warning: function result variable of a managed type
does not seem to be initialized
17 lines compiled, 0.1 sec, 34672 bytes code, 1316 bytes data
Ondrej
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel