ah ha! Nice catch michalis.

Found the culprit. [pascal]{$mode objfpc}{$H+}[/pascal]

Lazarus likes sticking this at the start of every new unit and program it creates. I have overall Delphi compatability mode set under my project's compiler options, but obviously didn't even notice that this little line was in there.

Thanks for the help guys. Seems I've been spoiled by the way Delphi simplifies pointers.