On 16/11/2025 15:58, Martin Frb via fpc-devel wrote:
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;
And also, if you had one of the HINT modifiers then you can have a
semicolon followed by cdecl (etc), but not another hint modifier.
program Project1;
{$Mode objfpc}
var
xyz: procedure deprecated; cdecl; experimental = nil; // ERROR
abc: procedure deprecated experimental; cdecl; // OK
foo: procedure cdecl; deprecated = nil;
//bar: procedure cdecl; deprecated;
begin
foo := nil; // issues: Note: foo is deprecated
end.
_______________________________________________
fpc-devel maillist - [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel