[fpc-devel] inconsistent source parsing ? (deprecated)
Martin Frb
lazarus at mfriebe.de
Sun Nov 16 15:58:32 CET 2025
In the below code, foo is accepted, and using foo issues the note that
it is deprecated.
So having a "deprecated" after the "cdecl; " works.
But only with "= nil".
the line for "bar" gives an error "begin" expected;
program Project1;
{$Mode objfpc}
var
foo: procedure cdecl; deprecated = nil;
//bar: procedure cdecl; deprecated;
begin
foo := nil; // issues: Note: foo is deprecated
end.
More information about the fpc-devel
mailing list