No mode switch - just apply the changes from my branch over at https://gitlab.com/CuriousKit/optimisations/-/tree/pure?ref_type=heads. To mark a function as pure, append the directive "pure" after the function definition, like you would with "virtual" or "inline", say.

Given it's a Free Pascal construct, it probably should be disabled in Delphi mode etc, but currently it isn't.

Kit

On 02/10/2023 12:43, Mattias Gaertner via fpc-devel wrote:


On 29.09.23 21:28, J. Gareth Moreton via fpc-devel wrote:
[...]  As the examples imply, to mark as a function as pure, simply
use the new "pure" directive.

When is it available? Is there a modeswitch?

Mattias
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to