[fpc-pascal] Warning: Variable xxx does not seem to be initialized

Marcos Douglas md at delfire.net
Mon Dec 30 20:08:17 CET 2013


Hi,

I'm using FPC 2.6.2 and {advancedrecords}.
The compiler shows a warning when I use a record variable. IMO this is
a bug because record variables need not be initialized, right?

project1.lpr(20,3) Warning: Variable "r" does not seem to be initialized

=== BEGIN ===
program Project1;

{$mode objfpc}{$H+}
{$modeswitch advancedrecords}

type
  TMyRec = record
    procedure Print;
  end;

procedure TMyRec.Print;
begin
  writeln('foo');
end;

var
  r: TMyRec;
begin
  r.Print;
end.
=== END ===

Marcos Douglas



More information about the fpc-pascal mailing list